[Packager] Cannot read property 'root' of null
Hello, I tried to update react-native or reinstalled it but no positive effect. This happens right after launching the app. Does anyone has more info on this ? Thanks
TypeError: Cannot read property 'root' of null
at /Users/isasportas/Projects/canalplus/iOS/RemoteX1/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
at tryCallOne (/Users/isasportas/Projects/canalplus/iOS/RemoteX1/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/isasportas/Projects/canalplus/iOS/RemoteX1/node_modules/react-native/node_modules/promise/lib/core.js:103:15
at flush (/Users/isasportas/Projects/canalplus/iOS/RemoteX1/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)
I'm getting the exact same error. I think i solved this one by updating flow and watchman. Now i have issues related to settings modules in react-native. I reverted back to 0.6 for now.
Used to be in React 0.5. No issues on React 0.6
I'm also seeing this on master ("react packager has encountered an internal error" in the app and "Cannot read property 'root' of null" in the packager). I first got this after pulling master last Thursday afternoon. I had to revert to back to 951b5f9 (26 June) so I could keep working.
Ah, good tip @chirag04: updating watchman (brew update and brew upgrade watchman) fixed this issue for me.
Yep upgrading watchman fixed the issue. Thanks. But it would have been too simple to make things work haha, now I'm getting this :
Error: undefined is not an object (evaluating 'RCTSettingsManager.settings')
So the same issue as @chirag04 ... I'm on 0.6 by the way
@ilansas I have the exact same error. Not sure what is the fix here.
This issue is exhibited in master at the current time. I performed a git pull origin master, then npm i.
Looking for JS files in
/www/ios/react-native.fresh
React packager ready.
[1:11:43 PM] <START> fs crawl
TypeError: Cannot read property 'root' of null
at /www/ios/react-native.fresh/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
at tryCallOne (/www/ios/react-native.fresh/node_modules/promise/lib/core.js:37:12)
at /www/ios/react-native.fresh/node_modules/promise/lib/core.js:103:15
at flush (/www/ios/react-native.fresh/node_modules/promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)
[1:11:44 PM] <START> request:/Examples/UIExplorer/UIExplorerApp.ios.includeRequire.runModule.bundle?dev=true
Removing node_modules and doing an npm doesn't fix the issue.
@jaygarcia update your watchman
@chirag04 , that fixed it.
Any way we could get a warning setup somehow?
+1 go this error as well. Resolved it by upgrading watchman as above.
As mentioned previously it'd be nice to know that the watchman version is too old for the specific version of react-native. As an external dependency outside of npm, it'd be great to be able to check that version to show custom error messages to guide the user.
@brentvatne seems like the solution is to upgrade watchman
@malkomalko - good point, can you create an issue or PR for that? Closing this one as upgrading solves it!
same issue, a warning would have been welcomed (i guess pr hasn't been opened yet)
i have some issue, but brew upgrade watchman,it's ok.
In addition to upgrading Watchman, I also had to quit terminal in order to clear the error. Killing the terminal window that Xcode opened should be sufficient.
Chiming in here, I had to upgrade watchman as well. That fixed it for me! It would be nice if the docs mentioned updating brew prior to installing the necessary packages.
@ryanmcdermott "We recommend periodically running brew update && brew upgrade to keep your programs up-to-date." it does, but I guess it doesn't say "do that first"
@browniefed I should always be in the habit of doing that regardless of if I read directions or not!