查看文件更改时出错:EMFILE"当运行的例子从facebook/react-native/ examples

"Error watching file for changes: EMFILE" when run the examples from facebook/react-native/Examples

本文关键字:运行 examples react-native facebook quot 文件 出错 EMFILE      更新时间:2023-09-26

我想在OS X 10.12中运行来自facebook/react-native/Examples的示例。

首先使用npm install,然后使用npm start:

有一个错误:

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)

然后我使用Xcode运行代码,但有相同的错误。

我需要帮助或建议。非常感谢。

react-native-cli依赖于watchman,你可以尝试用brew install watchman安装watchman,然后再试一次

这为我解决了这个问题:brew install watchman