react-native: [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)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 62 (17 by maintainers)

Most upvoted comments

I’ve bought a new MacBook Pro and the problem fixed.

Ah, good tip @chirag04: updating watchman (brew update and brew upgrade watchman) fixed this issue for me.

brew update && brew unlink watchman && brew install watchman -HEAD

this works for me

Works now. Notice you seem to have forgotten a -

I think to make sure run them separately like this because parts of the above command failed for me.

brew update
brew uninstall watchman
brew unlink watchman
brew install watchman --HEAD

@alejomendoza - try brew uninstall watchman and brew install watchman -HEAD

$ brew uninstall watchman
$ brew  install watchman --HEAD

works for me. When I use brew upgrade watchman,only get Error: watchman-HEAD already installed.

brew update && brew unlink watchman && brew install watchman -HEAD then closing the terminal and rebuilding the app worked for me.

brew uninstall watchman

and

brew install watchman -HEAD

Worked for me … Before was getting error as I had two versions of watchman installed .

@xcatliu run the following commands: “brew update && brew upgrade watchman”

@jaygarcia update your watchman