退出博览会后在项目上运行本机启动错误

时间:2020-06-03 20:59:51

标签: react-native expo

我刚刚使用expo弹出功能从Expo中弹出了项目,当我尝试使用react-native start运行它时,在终端中收到以下错误消息:

events.js:287
      throw er; // Unhandled 'error' event
      ^

Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:127:28)
Emitted 'error' event on NodeWatcher instance at:
    at NodeWatcher.checkedEmitError (/usr/local/lib/node_modules/react-native/node_modules/sane/src/node_watcher.js:143:12)
    at FSWatcher.emit (events.js:310:20)
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:133:12) {
  errno: -24,
  syscall: 'watch',
  code: 'EMFILE',
  filename: null
}

我无法确定解决此问题所需的知识,因此有人可以指出我应该采取的适当步骤以使我的项目在react-native上运行吗?谢谢!

2 个答案:

答案 0 :(得分:1)

在命令行中运行以下命令以安装watchman:

brew update
brew install watchman

答案 1 :(得分:0)

尝试安装watchman-改进了react native打包程序服务器的文件监视功能。参见:https://facebook.github.io/watchman/