Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Won't Run on NPM Start Command #14

Closed
lesreaper opened this issue Dec 16, 2016 · 7 comments
Closed

Won't Run on NPM Start Command #14

lesreaper opened this issue Dec 16, 2016 · 7 comments

Comments

@lesreaper
Copy link

lesreaper commented Dec 16, 2016

Description

Installing app and trying to run using:
react-vr init MyAppName
cd MyAppName
npm start

Expected behavior

Start server

Actual behavior

I get an error:

npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/7.0.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! MyAppName@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 11
npm ERR! 
npm ERR! Failed at the MyAppName@0.0.1 start script 'node node_modules/react-native/local-cli/cli.js start'.

full npm-debug copy log

Additional Information

  • react-vr package version: [0.1.0]
  • react-vr-web package version: [0.1.0]
  • Operating System: [MacOS Sierra 10.12.1]
  • Graphics Card: [Intel Iris]
  • Browser: [Chrome 54 or Firefox 49 ]
  • VR Device: [Browser ]
@lesreaper lesreaper changed the title Won't Run on Start Command Won't Run on NPM Start Command Dec 16, 2016
@andrewimm
Copy link
Contributor

Node conveniently has no documentation around exit code 11, so I'm working a bit blindly here, but 11 is typically associated with segfaults in other contexts. I notice you're running 7.0.0. Do you mind trying to update Node? I know the RN packager had a number of issues with 7.0.0

@lesreaper
Copy link
Author

lesreaper commented Dec 16, 2016

I tried using Node v7.2.1, 6.9.2, neither work. I tried but failed running it on port 3000 as well via:
npm start --port=3000

I also get this error, which I'm not familiar with. It may just be junk, I don't know.

2016-12-15 21:14 node[31591] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-12-15 21:14 node[31591] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-12-15 21:14 node[31591] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-12-15 21:14 node[31591] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
 ERROR  Error watching file for changes: EMFILE
{"code":"EMFILE","errno":"EMFILE","syscall":"Error watching file for changes:","filename":null}
Error: Error watching file for changes: EMFILE
    at exports._errnoException (util.js:1022:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)

@andrewimm
Copy link
Contributor

Hmm, they may be related. Since you're on a Mac, I recommend installing Watchman, as described here: https://facebook.github.io/react-native/docs/getting-started.html

Watchman is a much more efficient filesystem watcher than the one that ships in Node, or native solutions like chokidar. It should resolve those file-watching errors, and will definitely make the actually development much faster.

@andrewimm
Copy link
Contributor

I'm assuming you've also already tried blowing away the node_modules folder and retrying npm install?

@lesreaper
Copy link
Author

lesreaper commented Dec 16, 2016

I tried blowing away node_modules on 6.9.2 and 7.2.1, and neither worked.

I installed Watchman, blew away the node-modules, npm install, and then it didn't crash. I went to the URL http://localhost:8081/vr/ and it loaded.

I don't know why that was the solution, but it might be something to add to the documentation for a later note. As of right now I use React.js, not React Native, so didn't think of that. Thanks for the help.

@andrewimm
Copy link
Contributor

Thanks, I'll be sure to update the documentation to clarify that we're using the packager from React Native, and probably add a section about Watchman for Mac/Linux users. For the initial documentation, we didn't want the setup process to be too overwhelming, since things should work without Watchman, but it drastically improves the experience.

@rpgroot
Copy link

rpgroot commented Oct 4, 2017

thanks @andrewimm , install watchman solve my problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants