Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process is not defined #525

Closed
alinz opened this issue Aug 15, 2015 · 4 comments
Closed

process is not defined #525

alinz opened this issue Aug 15, 2015 · 4 comments

Comments

@alinz
Copy link

alinz commented Aug 15, 2015

Hello,
First of all I would like to give you a big thank.

So, I had no problem with 1.0.0-rc until I removed the node_modules and install everything again. what I found was red death screen which complains about process is not defined. At the first, I thought I missed something and I started debugging the code.

Here's the code which causes the issue.

const createStoreWithMiddleware = applyMiddleware(thunk)(createStore);
const reducer = combineReducers(reducers);
const store = createStoreWithMiddleware(reducer);

combineReducers method cause the whole thing to crash. I have not changed any code on my side.

So has anyone have this problem? Have you guys pushed code into 1.0.0-rc branch? It used to work.

@chentsulin
Copy link
Contributor

I believe this is because react-native's JavaScriptCore env doesn't have v8's process object. So we can use __DEV__ instead.

And after some moment if this project will only need to support react-native version which include facebook/react-native#2279 polyfill. Then, we can drop all of __DEV__.

@gaearon
Copy link
Contributor

gaearon commented Aug 15, 2015

Argh, this is really frustrating. Second time I'm burned by this.

@gaearon
Copy link
Contributor

gaearon commented Aug 15, 2015

Should be fixed in 1.0.1.

@gaearon gaearon closed this as completed Aug 15, 2015
@alinz
Copy link
Author

alinz commented Aug 16, 2015

Awesome, Thank you @gaearon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants