【发布时间】:2020-12-12 13:02:04
【问题描述】:
我正在尝试使用此命令捆绑我的 ios 版本:
react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios
但每次我尝试得到这个错误:
events.js:292
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:315:20)
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:133:12) {
errno: -24,
syscall: 'watch',
code: 'EMFILE',
filename: null
}
我尝试了以下方法:killnode 命令、安装 watchman、重启机器、删除 node_modules 文件夹和 npm install。到目前为止,还没有任何工作,并且错误一直显示。
【问题讨论】:
-
我知道 OP 说删除
node_modules没有用,但我删除了它和yarn.lock,然后构建正常工作,所以对于任何看到这个的人来说都值得一试