redux-react-native-counter-example icon indicating copy to clipboard operation
redux-react-native-counter-example copied to clipboard

TypeError: Cannot read property 'root' of null

Open barakcoh opened this issue 11 years ago • 7 comments

I've installed properly using the instructions w/o a hitch and npm start started the packager but when running the simulator I immediately get a red screen and the packager shows:

[19:23:03] <START> fs crawl
TypeError: Cannot read property 'root' of null
    at /Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
    at tryCallOne (/Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
    at /Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/lib/core.js:103:15
    at flush (/Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
    at process._tickCallback (node.js:442:13)
[19:23:15] <START> request:/index.ios.bundle
[19:23:15] <START> find dependencies

Complete packager output:

┌────────────────────────────────────────────────────────────────────────────┐
 │  You are currently running Node v0.10.35.                                  │
 │                                                                            │
 │  React Native is moving to io.js 2.x. There are several ways to            │
 │  upgradeto io.js depending on your preference.                             │
 │                                                                            │
 │  nvm:       nvm install iojs && nvm alias default iojs                     │
 │  Homebrew:  brew unlink node; brew install iojs && brew ln iojs --force    │
 │  Installer: download the Mac .pkg from https://iojs.org/                   │
 │                                                                            │
 │  About io.js:     https://iojs.org                                         │
 │  Follow along at: https://github.com/facebook/react-native/issues/1737     │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
 ┌────────────────────────────────────────────────────────────────────────────┐
 │  Running packager on port 8081.                                            │
 │                                                                            │
 │  Keep this packager running while developing on any JS projects. Feel      │
 │  free to close this tab and run your own packager instance if you          │
 │  prefer.                                                                   │
 │                                                                            │
 │  https://github.com/facebook/react-native                                  │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
   /Users/barak/workspace/temp/redux-react-native-counter-example


React packager ready.

[19:23:03] <START> fs crawl
TypeError: Cannot read property 'root' of null
    at /Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
    at tryCallOne (/Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
    at /Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/lib/core.js:103:15
    at flush (/Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
    at process._tickCallback (node.js:442:13)
[19:23:15] <START> request:/index.ios.bundle
[19:23:15] <START> find dependencies

barakcoh avatar Aug 09 '15 16:08 barakcoh

Are you using the latest version of watchman ?

— Arni Fannar

On Sun, Aug 9, 2015 at 4:26 PM, Barak Cohen [email protected] wrote:

I've installed properly using the instructions w/o a hitch and npm start started the packager but when running the simulator I immediately get a red screen and the packager shows:

[19:23:03] <START> fs crawl
TypeError: Cannot read property 'root' of null
    at /Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
    at tryCallOne (/Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
    at /Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/lib/core.js:103:15
    at flush (/Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
    at process._tickCallback (node.js:442:13)
[19:23:15] <START> request:/index.ios.bundle
[19:23:15] <START> find dependencies

Complete packager output:

┌────────────────────────────────────────────────────────────────────────────┐
 │  You are currently running Node v0.10.35.                                  │
 │                                                                            │
 │  React Native is moving to io.js 2.x. There are several ways to            │
 │  upgradeto io.js depending on your preference.                             │
 │                                                                            │
 │  nvm:       nvm install iojs && nvm alias default iojs                     │
 │  Homebrew:  brew unlink node; brew install iojs && brew ln iojs --force    │
 │  Installer: download the Mac .pkg from https://iojs.org/                   │
 │                                                                            │
 │  About io.js:     https://iojs.org                                         │
 │  Follow along at: https://github.com/facebook/react-native/issues/1737     │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
 ┌────────────────────────────────────────────────────────────────────────────┐
 │  Running packager on port 8081.                                            │
 │                                                                            │
 │  Keep this packager running while developing on any JS projects. Feel      │
 │  free to close this tab and run your own packager instance if you          │
 │  prefer.                                                                   │
 │                                                                            │
 │  https://github.com/facebook/react-native                                  │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
   /Users/barak/workspace/temp/redux-react-native-counter-example
React packager ready.
[19:23:03] <START> fs crawl
TypeError: Cannot read property 'root' of null
    at /Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
    at tryCallOne (/Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
    at /Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/lib/core.js:103:15
    at flush (/Users/barak/workspace/temp/redux-react-native-counter-example/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
    at process._tickCallback (node.js:442:13)
[19:23:15] <START> request:/index.ios.bundle
[19:23:15] <START> find dependencies

Reply to this email directly or view it on GitHub: https://github.com/arnif/redux-react-native-counter-example/issues/2

arnif avatar Aug 09 '15 16:08 arnif

wow, that actually worked! thanks a million :)

for posterity, if you encounter the above do: brew update && brew upgrade watchman

barakcoh avatar Aug 09 '15 16:08 barakcoh

Thanks it worked :+1:

nalwayaabhishek avatar Sep 20 '15 14:09 nalwayaabhishek

I am still getting the error and it looks like I am already on the latest version of watchman. What version do you all have? Error: watchman 3.8.0 already installed node --version: v4.1.1

GentryRiggen avatar Oct 04 '15 14:10 GentryRiggen

I'm running 3.7.0

barakcoh avatar Oct 05 '15 09:10 barakcoh

I had to reboot my computer... because that's still a thing in 2015...

GentryRiggen avatar Oct 05 '15 14:10 GentryRiggen

when i load js it prompt me is Connected ,then i add the ip and port as 192.168.40.73:8081,this is my computer ip,but it still can not Connected.my watchman is 3.0.0,and one thing i find my partner's phone just need add the ip address but my phone prompt me to add the ip address and port?

MrAllRight avatar Feb 17 '16 03:02 MrAllRight