[英]“Error watching file for changes: EMFILE” when init a react-native project
I want to init a react-native project, and steps: 我要启动一个本机反应项目,并执行以下步骤:
First react-native init testproject
then react-native run-ios
首先
react-native init testproject
然后react-native run-ios
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 exports._errnoException (util.js:1008:11)
at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)
Operation System Edition: OS X 10.12 操作系统版本:OS X 10.12
Reinstalling watchman fixed this error for me. 重新安装watchman为我修复了此错误。
brew uninstall watchman
brew install watchman
One more thing that worked for my teammate and may work for you is deleting node_modules
directory completely and running 对我的队友可能还适用的另一件事是完全删除
node_modules
目录并运行
npm install
Note that yarn install
did not work in this case. 请注意,在这种情况下无法
yarn install
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.