4

我想启动一个 react-native 项目,步骤:

react-native init testproject 然后 react-native run-ios

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:1008:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)

操作系统版本:OS X 10.12

4

1 回答 1

3

重新安装守望者为我修复了这个错误。

brew uninstall watchman
brew install watchman

对我的队友有用并且可能对您有用的另一件事是node_modules完全删除目录并运行

npm install

请注意,yarn install在这种情况下不起作用。

于 2017-02-21T04:59:40.480 回答