react-native: [Packager] "type":"InternalError","message":"react-packager has encountered an internal error

I started getting an InternalError error opening my React app in the iOS Simulator:

{"type":"InternalError","message":"react-packager has encountered an internal error, please check your terminal error output for details"}

The XCode debug window has the following warning:

2015-09-30 08:25:36.383 [warn][tid:NSOperationQueue 0x7fd84bf81f30 :: NSOperation 0x7fd84bc8bed0 (QOS: LEGACY)][RCTDevMenu.m:211] RCTSourceCode module scriptURL has not been set

And my terminal running npm start has the error:

Error: failed to parse query: must use ["allof", expr...]
    at BunserBuf.<anonymous> (/SandBox/hkiosk_react/node_modules/react-native/node_modules/sane/node_modules/fb-watchman/index.js:93:23)
    at emitOne (events.js:77:13)
    at BunserBuf.emit (events.js:169:7)
    at BunserBuf.process (/SandBox/hkiosk_react/node_modules/react-native/node_modules/sane/node_modules/fb-watchman/node_modules/bser/index.js:289:10)
    at /SandBox/hkiosk_react/node_modules/react-native/node_modules/sane/node_modules/fb-watchman/node_modules/bser/index.js:244:12
    at doNTCallback0 (node.js:407:9)
    at process._tickCallback (node.js:336:13)

None of these error messages help identify, where, what or why the problem is happening.

Other reported issues #3022, #2345, #2550 haven’t helped narrow down the issue for me either.

Suggestions of restarting computer, reinstalling watchman, etc have not helped.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 24 (5 by maintainers)

Most upvoted comments

I have this problem too, any solutions? I tried all above and it didn’t work. The solution was to restart my osx. I don’t know why it works now, but it’s all good. 😃

Here are some steps you can take to try to get things in a good state:

  • Keep your Homebrew modules updated, especially Watchman
  • Keep Node updated (4+). In a future release of React Native we’ve told npm to print a warning/error if your version of Node is too old.
  • Restart Watchman. Try watchman watch-del-all or a more forceful option: pkill watchman.
  • Restart the packager. Just close the terminal window where it’s running. Make sure your packager and version of React Native are in sync. Restart the packager when you upgrade React Native.
  • Clear the packager cache in $TMPDIR/react-packager-cache-*. and restart.

Solution: for (react-packager has encountered an internal error, please check your terminal error output for more details) I was getting this exception on an empty file , my image in the component <Image source={require(‘./img/favicon1.png’)} /> was an empty file, once I have pasted an actual png file to the img folder all went well

npm i worked for me

I ran into this error just because I added some comments like //comments goes here in the package.json file. I removed the comments and It’s OK now.