I am including npm react package in a script in the following way:
var react = require('react');
I am using node however when i do this and run my local node server i get the following error in the browser:
checkPropTypes.js:12 Uncaught ReferenceError: process is not defined
at Object.6../lib/ReactPropTypesSecret (checkPropTypes.js:12)
at s (_prelude.js:1)
at _prelude.js:1
at Object.8../checkPropTypes (factoryWithTypeCheckers.js:17)
at s (_prelude.js:1)
at _prelude.js:1
at Object.7../factoryWithTypeCheckers (factory.js:16)
at s (_prelude.js:1)
at _prelude.js:1
at Object.24../ReactElement (ReactPropTypes.js:16)
I'm not sure what is causing this error. I have tried to set NODE_ENV environmental variable using:
export NODE_ENV='development'
If anyone could shed any light on why i am getting this error that would be helpful.
Thanks in advance.
via Wooooo
No comments:
Post a Comment