簡體   English   中英

初始化本機項目時出現“錯誤監視文件的更改:EMFILE”

[英]“Error watching file for changes: EMFILE” when init a react-native project

我要啟動一個本機反應項目,並執行以下步驟:

首先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)

操作系統版本:OS X 10.12

重新安裝watchman為我修復了此錯誤。

brew uninstall watchman
brew install watchman

對我的隊友可能還適用的另一件事是完全刪除node_modules目錄並運行

npm install

請注意,在這種情況下無法yarn install

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM