mjohnston / react-native-webpack-server

Build React Native apps with Webpack
MIT License
933 stars 84 forks source link

Android won't run - Invariant Violation #132

Closed Ehesp closed 8 years ago

Ehesp commented 8 years ago

I've pulled the repository example https://github.com/mjohnston/react-native-webpack-server/tree/master/Examples/BabelES6

Followed the instructions, however once the app starts on the emulator I get the following error:

image

Node: 5.0.0 NPM: 3.3.6

I've tried a full reinstall of Node & NPM so this is not the issue.

Chrome Debugger shows the following error too:

image

Related to https://github.com/jhabdas/react-native-webpack-starter-kit/issues/11

Salakar commented 8 years ago

+1 - Getting the same issue here.

image

Salakar commented 8 years ago

Turns out it was setting the debug server that did the trick, as per https://github.com/mjohnston/react-native-webpack-server#setup - woops. Feel free to close when @Ehesp confirms working.

EvHaus commented 8 years ago

I have the same problem as the original post, and setting the dev server to "localhost" doesn't help. Instead I now get "Unable to download JS bundle. Did you forget to start the development server or connect your device?" error.

I'm on Windows 10, running Android emulator via Genymotion using react-native 0.15.0-rc and rnws 0.8.2-rc.

Salakar commented 8 years ago

You need open another cmd window and have 'npm run start' running. On 9 Nov 2015 3:49 a.m., "Evgueni Naverniouk" notifications@github.com wrote:

I have the same problem as the original post, and setting the dev server to "localhost" doesn't help. Instead I now get "Unable to download JS bundle. Did you forget to start the development server or connect your device?" error.

— Reply to this email directly or view it on GitHub https://github.com/mjohnston/react-native-webpack-server/issues/132#issuecomment-154911429 .

EvHaus commented 8 years ago

@Salakar Hmm. I do have the webpack + react-native server running via `set HOT=1 && rnws start --hot". Is that what you mean?