3
votes

I am following this Facebook tutorial, and when running react-native run-android from AwesomeProject dir, I am getting a red screen on the android emulator, with the following text:

Unable to download JS bundle. Did you forget to start the development server or connect your device?
onResponse
DevServerHelper.java:175
run
NamedRunnable.java:33
runWorker
ThreadPoolExecutor.java:1113
run
ThreadPoolExecutor.java:588
run
Thread.java:818

I don't know if it's related, but I'm also getting a bunch of SyntaxErrors on the server regarding const not being valid in strict mode (I did not change anything in the original code) and getting the following error on START:

< START> request:/index.android.bundle?platform=android
TypeError: Cannot read property 'root' of null
at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
at tryCallOne (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:103:15
at flush (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)

Update Upgrading to Node v4.1.1 got rid of the const syntax error, but I still get the same result with the following error on React Packager:

TypeError: Cannot read property 'root' of null at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84 at tryCallOne (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:37:12) at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:103:15 at flush (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29) at process._tickCallback (node.js:355:11) [5:02:20 PM] request:/index.android.bundle?platform=android [5:02:20 PM] find dependencies TypeError: Cannot read property 'root' of null at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84 at tryCallOne (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:37:12) at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:103:15 at flush (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29) at process._tickCallback (node.js:355:11) [5:02:26 PM] request:/index.android.bundle?platform=android

2

2 Answers

4
votes

I managed to solve the issue. To anyone else who encounters the issue, re-installing watchman did the trick for me:
brew uninstall watchman
brew install watchman

My app is now running

0
votes

Also, I tried the Wathman install/uninstall route, with not much luck. What did work was making sure I updated and changed the version of node as used by nvm.

e.g. nvm install 4.1.1