Repository navigation
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Unfortunately I am having issues with getting the movies example app working :-(
I have installed watchman as per the instructions, and already had node v0.10.36 installed.
On running npm start all seems well. However when I load the movies example it fails.
Testing via the URL:
http://localhost:8081/Examples/Movies/MoviesApp.includeRequire.runModule.bundle
Yields the following error:
{"type":"InternalError","message":"React packager has encountered an internal error, please check your terminal error output for more details"}
And here is the terminal output:
$ npm start
> react-native@0.0.1 start /Users/colineberhardt/Projects/react-native
> ./packager/packager.sh
===============================================================
| 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
|
===============================================================
React packager ready.
SyntaxError: Unexpected end of input
at Object.parse (native)
at /Users/colineberhardt/Projects/react-native/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.js:270:32
at _fulfilled (/Users/colineberhardt/Projects/react-native/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/Users/colineberhardt/Projects/react-native/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/Users/colineberhardt/Projects/react-native/node_modules/q/q.js:749:13)
at /Users/colineberhardt/Projects/react-native/node_modules/q/q.js:557:44
at flush (/Users/colineberhardt/Projects/react-native/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:442:13)
[17:52:41] <START> find dependencies
I've had a poke around DependencyGraph and tried to add some logging but haven't made much progress.
Has anyone else ecountered (and maybe solved!) this issue?
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Activity
vjeux commentedon Feb 6, 2015
cc @amasad
jimjeffers commentedon Feb 7, 2015
I'm running into the same issue here. Here are my local node and npm versions just for reference:
→ npm -v
2.1.7
→ node -v
v0.10.33
amasad commentedon Feb 7, 2015
That failure is at a line where it's trying to JSON.parse a package.json file. I'm looking into this now but do you have any custom node module that may have a malformed package.json?
amasad commentedon Feb 7, 2015
Hey @jimjeffers @ColinEberhardt can you add a
console.log(content)before this line https://github.com/facebook/react-native/blob/master/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.js#L270That way we know what is failing to parse.
ColinEberhardt commentedon Feb 7, 2015
Thanks @amasad - this is the strange thing, when I add a console.log ...
I observe the following:
i.e. it outputs lots of package.json output, all of which looks fine. Then it hits the error but I don't see
contentin the console log.I've added logging to try and determine which file is causing issues:
On
npm startI see a whole lot of logging, ending as follows:Then as soon as I hit the URL in the browser, the following error is logged:
I'm a bit baffled as i would have expected some logging before the error to indicate which package.json it was opening.
Confused!
vjeux commentedon Feb 7, 2015
@amasad would be nice to add a proper error message if a package.json file is malformed
amasad commentedon Feb 7, 2015
It seems like it's choking on some test package.json files. I think we should ignore malformed package.json and just warn when building the dependency graph. Once the user require that module will figure out that something is wrong.
amasad commentedon Feb 7, 2015
@ColinEberhardt will land a fix soon but try this for now:
ColinEberhardt commentedon Feb 7, 2015
Thanks @amasad - here's the culprit:
amasad commentedon Feb 7, 2015
Interesting, why do you have npm in mode_modules? Do we require it as a
dependency?
Regardless, will land the fix to ignore these malformed packages.
On Saturday, February 7, 2015, Colin Eberhardt notifications@github.com
wrote:
ColinEberhardt commentedon Feb 7, 2015
Ahhhh!!! Found the issue - I mistakenly cut and paste the instructions from the README:
Note, the lack of line-break, which causes an
npm install npm. Must have just been running on auto-pilot!amasad commentedon Feb 7, 2015
Haha no worries at all. Thanks for exposing this bug
On Saturday, February 7, 2015, Colin Eberhardt notifications@github.com
wrote:
vjeux commentedon Feb 12, 2015
We fixed both the README and the error message. Thanks for this!
JSONKit usage here may cause serious crash hard to debug(I found the …
Haroenv commentedon Aug 6, 2017
I have this error message without a path, did something get reverted?
joshkarges commentedon Nov 4, 2017
I have @Haroenv's same issue.
yemarnevets commentedon Feb 22, 2018
I did a complete fresh install from the guide: https://facebook.github.io/react-native/docs/getting-started.html and I'm still running into this issue. The error message is quite cryptic. I'd hope for more detail in development mode.
"07:53:10: Problem checking node_modules dependencies: Unexpected end of JSON input"