Kordi
Kordi

Reputation: 2465

Cannot find module 'react (gulp babelify browerify)

When I run npm run gulp all worked when creating the javascript. But when I run the javascript inside the browser the following error appears:

_prelude.js:1 Uncaught Error: Cannot find module 'react' at o (_prelude.js:1)

I installed react and react-dom, if I use node and require('react') all is fine.

What did I wrong?

Upvotes: 0

Views: 60

Answers (1)

Kordi
Kordi

Reputation: 2465

I just forgot to include the vendors.js in the debug mode.

<script src="/static/js/vendors.js"></script>

After including all worked fine as expected.

Upvotes: 0

Related Questions