facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.23k forks source link

Error watching file for changes: EMFILE #23

Closed encodi closed 7 years ago

encodi commented 7 years ago

Running npm start after the npm install in a MacOSX Sierra. Returns an error:

MBP-de-Enrique:reactvr-preview encodi$ npm start

@ prestart /Users/encodi/Development/ReactVR-preview node -e "try{require('fs').statSync('node_modules')}catch(e){process.exit(1)}" || npm install

@ start /Users/encodi/Development/ReactVR-preview node node_modules/react-native/local-cli/cli.js start --root .

(node:28392) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. (node:28392) DeprecationWarning: Using Buffer without new will soon stop working. Use new Buffer(), or preferably Buffer.from(), Buffer.allocUnsafe() or Buffer.alloc() instead. Scanning 632 folders for symlinks in /Users/encodi/Development/ReactVR-preview/node_modules (9ms) ┌────────────────────────────────────────────────────────────────────────────┐ │ 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 │ │ │ └────────────────────────────────────────────────────────────────────────────┘ Looking for JS files in /Users/encodi/Development/ReactVR-preview /Users/encodi/Development/ReactVR-preview

[Hot Module Replacement] Server listening on /hot

React packager ready.

2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22) 2016-12-16 10:59 node[28392] (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:1282:11)

See http://facebook.github.io/react-native/docs/troubleshooting.html for common problems and solutions.

npm ERR! Darwin 16.3.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v7.2.0 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! @ start: node node_modules/react-native/local-cli/cli.js start --root . npm ERR! Exit status 11 npm ERR! npm ERR! Failed at the @ start script 'node node_modules/react-native/local-cli/cli.js start --root .'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node node_modules/react-native/local-cli/cli.js start --root . npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/encodi/Development/ReactVR-preview/npm-debug.log MBP-de-Enrique:reactvr-preview encodi$

ealameda commented 7 years ago

You need to install watchman to fix this.

encodi commented 7 years ago

Thanks @ealameda,

Problem was using the watchman from npm for some strange reason, worked ok with a brew install --HEAD watchman

sirkitree commented 7 years ago

Still getting this error even after running brew install -HEAD watchman.

 npm start

> WelcomeToVR@0.0.1 start /Users/sirkitree/repos/WelcomeToVR
> node node_modules/react-native/local-cli/cli.js start

Scanning 591 folders for symlinks in /Users/sirkitree/repos/WelcomeToVR/node_modules (4ms)
 ┌────────────────────────────────────────────────────────────────────────────┐
 │  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                                  │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
   /Users/sirkitree/repos/WelcomeToVR

[Hot Module Replacement] Server listening on /hot

React packager ready.

2016-12-17 10:37 node[2239] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-12-17 10:37 node[2239] (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)

See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.

npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! WelcomeToVR@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 WelcomeToVR@0.0.1 start script 'node node_modules/react-native/local-cli/cli.js start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the WelcomeToVR package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/react-native/local-cli/cli.js start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs WelcomeToVR
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls WelcomeToVR
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/sirkitree/repos/WelcomeToVR/npm-debug.log
JuanDelgadillo commented 7 years ago

Thanks @ealameda for me worked well after brew install --HEAD watchman command.