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.
hi @dalezak - I've had this problem before and it seemed to be specific to a single project. If you create a new project do you still have this issue?
Hi @brentvatne, I created a new project, and was able to launch the new app.
I did have this error happen before, I finally ended up deleting and recreating the project, and manually copying over the source files one by one.
But there must be a better way to resolve this error rather than starting from scratch each time?
Hi @dalezak, I'm facing the same issue as you had. Did you find a better way? I'm currently upgrading from v0.8.0 to v0.11.0. Tested a new project and that works fine...
Unfortunately no. Looks like something gets corrupted with the project, and from that point on can't run the app. Sadly the errors don't contain much meaningful information to debug where or why the problem is happening. Hopefully this will be fixed in the new version of React Native.
Okay, then I'll just copy my files to the new project... :-) Thanks for your quick response.
I have run into this issue as well. I've tried clearing out a load of cached stuff like ~/Library/Caches/com.apple.dt.Xcode ~/Library/Developer/Xcode/ etc but it doesn't seem to help! I don't quite know what the culprit is but it is hiding somewhere pretty well...
Also not sure what triggered the issue in the first place.
@dalezak I had the same issue and noticed that the package manager (which is opened in the terminal) was failing with the following:
AwesomeProject/node_modules/react-native/packager/transformer.js:13
const babel = require('babel-core');
^^^^^
SyntaxError: Use of const in strict mode.
I solved this by upgrading node to 4.x and verifying the packager was running this version.
Same thing happened to me immediately after upgrading to El Capitan.
Here are some steps you can take to try to get things in a good state:
watchman watch-del-all or a more forceful option: pkill watchman.$TMPDIR/react-packager-cache-*. and restart.I ran into the sameRCTSourceCode module scriptURL has not been set error described here, and after trying all of @ide 's suggestions, I still wasn't able to get a working static pre-bundled version of the app. However, after checking http://facebook.github.io/react-native/docs/running-on-device-ios.html#troubleshooting, I decide to "Add Files to
thanks @ewaltman that was exactly my problem
:+1: @pwcremin glad that helped
@ewaltman same problem here, thanks. (keyword : rctsourcecode module scripturl has not been set)
i am running into a version of this but the above solutions don't work for me :(
On the ios simulator I see 'Unexpected token' for await and on the xcode console i see RCTSourceCode module scriptURL has not been set. And interestingly it only happens when i require a specific file that uses await in it while i use await elsewhere without a problem
Mind boggling as I dont see any other error logs.. It seems to me like this specific file probably gets missed transforming or something ?
Help Please!
@pvenkatakrishnan Can you share the code?
@satya164 i realized it was a syntactical miss. I missed noticing that async keyword was missing on the function that did the await, as it was a asynchronous Action I was constructing using Redux. Adding that in fixed the issue... Thanks !
@facebook-github-bot answered
Closing this issue as @jsierles says the question asked has been answered. Please help us by asking questions on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.
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.
npm i worked for me
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. :)
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
was an empty file, once I have pasted an actual png file to the img folder all went well
restarting the packager worked for me
npm i worked for me
Most helpful comment
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. :)