简体   繁体   English

初始化本机项目时出现“错误监视文件的更改:EMFILE”

[英]“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.

相关问题 “从facebook / react-native / Examples运行示例时,”观察更改文件时出错:EMFILE“ - “Error watching file for changes: EMFILE” when run the examples from facebook/react-native/Examples 在React-Native项目上开玩笑时出错 - Error when running jest on React-Native project 错误在React-Native中编译项目时无法执行aapt - Error Failed to execute aapt, when compiling project in React-Native 尝试安装 react-native 项目时出错 - Error when try to install react-native project 在Macbook上运行react-native项目时出现路径错误 - Path error when running react-native project on my macbook 使用 react-native init 创建应用程序时出错<AppName> :错误:[Errno 2] 没有这样的文件或目录:“添加” - Error while creating a app with react-native init <AppName>: ERROR: [Errno 2] No such file or directory: 'add' npx react-native init 错误在 appdata 文件夹中不包含 package.json 文件 - npx react-native init error does not contain a package.json file in appdata folder 当我使用“react-native run-ios”运行 React Native 项目时显示错误 - React Native project showing error when I run it using "react-native run-ios" React Native 初始化项目 - React Native init Project 为什么 npx react-native init MyApp 不起作用并且不创建 React Native 项目? - Why doesn't npx react-native init MyApp not work and doesn't create a React Native project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM