[英]Expo Developer Tools is disconnected and you can't reinstall watchman
After some time (and a few updates to my mac running currently macOS Big Sur 11.4
) I did try to simply start my expo app by running npm run start
which in fact is the same as running expo start
一段时间后(以及对我的 Mac 目前运行的macOS Big Sur 11.4
了一些更新)我确实尝试通过运行npm run start
来简单地启动我的 expo 应用程序,这实际上与运行expo start
相同
This opened expo in the browser and in CLI.这在浏览器和 CLI 中打开了博览会。 After a few seconds expo
disconnected with error:几秒钟后, expo
因错误而断开连接:
Expo Developer Tools is disconnected from Expo CLI. Use the expo start command to start the CLI again.
and in the terminal window I found this error:在终端窗口中,我发现了这个错误:
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:178:28)
Please note, this is a different issue than: Expo Developer Tools is disconnected from Expo CLI.请注意,这与以下问题不同: Expo Developer Tools 与 Expo CLI 断开连接。 Use the expo start command to start the CLI again 使用 expo start 命令再次启动 CLI
After researching I found out that I need to reinstall watchman
经过研究我发现我需要重新安装watchman
However, running brew reinstall watchman
gave me warning:但是,运行brew reinstall watchman
给了我警告:
Warning: You are using macOS 11.4.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
At the end of installation I've got a new error:在安装结束时,我遇到了一个新错误:
==> Reinstalling watchman
Error: Your CLT does not support macOS 11.4.
It is either outdated or was modified.
Please update your CLT or delete it if no updates are available.
What do do now?现在怎么办?
Maybe some steps are not required but running them all solved the issue:也许不需要某些步骤,但运行它们都解决了问题:
12.5.1
)将 XCode 更新到最新版本(当前: 12.5.1
)/Library/Developer/
by running sudo rm -rf /Library/Developer/
通过运行sudo rm -rf /Library/Developer/
删除/Library/Developer/
sudo rm -rf /Library/Developer/
sudo xcode-select --install
运行以下sudo xcode-select --install
再次安装命令行开发人员工具: sudo xcode-select --install
brew update
运行brew update
brew reinstall watchman
- that will finally update watchman
and will take significantly more time than previously running the same command which ended with an error.运行brew reinstall watchman
- 这将最终更新watchman
并且比以前运行以错误结束的相同命令花费的时间要多得多。 Now I can start expo
fine and it doesn't disconnect anymore.现在我可以正常启动expo
并且不再断开连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.