KVISH KVISH - 2 months ago 50
iOS Question

React-native package manager issues

I'm using the following tutorial online:

https://facebook.github.io/react-native/docs/integration-with-existing-apps.html

It uses the below project:

https://github.com/JoelMarcey/swift-2048

I'm trying to integrate my existing iPhone and android app with React Native. I used the sample on the site with swift and i'm unable to get

npm start
working. I get the below error:

[4:38:11 PM] <START> Building Dependency Graph
[4:38:11 PM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot

React packager ready.

2016-09-29 16:38 node[31197] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-09-29 16:38 node[31197] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-09-29 16:38 node[31197] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-09-29 16:38 node[31197] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-09-29 16:38 node[31197] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-09-29 16:38 node[31197] (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:953:11)
at FSEvent.FSWatcher._handle.onchange (fs.js:1400:11)

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

npm ERR! Darwin 16.0.0
npm ERR! argv "/Users/user/.nvm/versions/node/v6.2.0/bin/node" "/Users/user/.nvm/versions/node/v6.2.0/bin/npm" "start"
npm ERR! node v6.2.0
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! swift-2048@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the swift-2048@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 swift-2048 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 swift-2048
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls swift-2048
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:


this is the step where it says
npm start
. Is there anything I can deduce from the above? Any help appreciated as I'm really stuck. My versions are:

react-native-cli: 1.0.0
react-native: 0.26.1
node: 6.2.0


I'm also using
nvm
if that counts.

Answer

Do you have watchman installed? (see here for a list of macOS dependencies).

You can install it with brew install watchman (assuming you have homebrew).