React-native软件包管理器问题

时间:2016-09-29 23:42:03

标签: ios react-native

我在线使用以下教程:

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

它使用以下项目:

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

我试图将我现有的iPhone和Android应用程序与React Native集成。我使用swift网站上的示例,我无法让npm start工作。我收到以下错误:

[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:

这是表示npm start的步骤。我可以从上面推断出什么吗?任何帮助,因为我真的卡住了。我的版本是:

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

如果重要,我还会使用nvm

1 个答案:

答案 0 :(得分:4)

您是否安装了watchman? (有关macOS依赖关系的列表,请参阅here。)

您可以使用brew install watchman进行安装(假设您有homebrew)。