sudo npm start命令返回错误号11

时间:2018-04-20 03:42:50

标签: react-native npm npm-start

My-MacBook-Pro:MyProject User$ sudo npm start

React packager ready.

Loading dependency graph...2018-04-20 09:08 node[59306] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-04-20 09:08 node[59306] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-04-20 09:08 node[59306] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-04-20 09:08 node[59306] (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 _errnoException (util.js:1022:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1359:9)
Loading dependency graph...npm ERR! code ELIFECYCLE
npm ERR! errno 11
npm ERR! MyProject@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 MyProject@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/User/.npm/_logs/2018-04-20T03_38_51_324Z-debug.log
My-MacBook-Pro:MyProject User$

1 个答案:

答案 0 :(得分:0)

尝试运行此

>npm r -g watchman
>brew update && brew upgrade
>brew install watchman

以下是您issue的链接,现在紧跟this