【发布时间】:2019-11-02 20:50:38
【问题描述】:
我尝试使用 react-native start 运行 react-native-cli 项目,但 Metro 捆绑器失败,提示如下:
events.js 187
throw er; //Unhandled 'error' event
Error: EMFILE: too many open files, watch
Emitted 'error' event on NodeWatcher isntance at:
at NodeWatcher: checkedEmitError (.../react-native-project/node_modules/sane/src/node_watcher.js:143:12)
at FSWatcher.emit (events.js:210:5)
at FSEvent.FSWatcher:_handle onchange (internal/fs/watchers.js:129:12) {
errno: -24,
syscall: 'watch',
code : 'EMFILE',
filename: null
)
Process terminated. Press <enter> to close the window
【问题讨论】:
-
请标记我的答案是否对你有帮助
-
尝试您的解决方案后我仍然遇到问题。
-
尝试在终端上设置ulimit:ulimit 4096
-
切换到节点 16 为我解决了这个问题
nvm alias default 16
标签: react-native react-native-ios