【问题标题】:sudo npm start command returning an error no 11sudo npm start 命令返回错误号 11
【发布时间】:2018-09-30 16:44:55
【问题描述】:
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$

【问题讨论】:

  • 需要更多信息,但您之前是否运行过 npm install
  • 是的。我运行它。

标签: react-native npm npm-start


【解决方案1】:

尝试运行这个

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

这是您现在得到的issue 的链接,后面是this

【讨论】:

    猜你喜欢
    • 2019-06-22
    • 1970-01-01
    • 2021-02-11
    • 2021-01-01
    • 2021-09-03
    • 2020-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多