expo / ex-navigator

Route-centric navigation built on top of React Native's Navigator
MIT License
522 stars 68 forks source link

cannot read 'NODE_ENV' #50

Closed mimamuh closed 9 years ago

mimamuh commented 9 years ago

Tried to use ExNavigator like described on the readme and got the exeption in the invaraint-function of browser.js file in line @ 25:0. It tries to get the environment variable (if (process.env.NODE_ENV !== 'production')) but they are undefined? I use it with react-native 0.15. Any idea?

ide commented 9 years ago

You need to require react-native in your code before anything else. It will set up process.env for you.

mimamuh commented 9 years ago

Got it - it was a bad written polyfill of mine .. but your answer helped me to recognise it after long search, thx! :)