Cannot find module 'react (gulp babelify browerify)

50 views Asked by At

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?

1

There are 1 answers

0
Kordi On

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.