【问题标题】:Expo Developer Tools is disconnected and you can't reinstall watchmanExpo Developer Tools 已断开连接,您无法重新安装 watchman
【发布时间】:2021-09-13 19:15:00
【问题描述】:

一段时间后(以及对当前运行的我的 mac 的一些更新 macOS Big Sur 11.4)我确实尝试通过运行 npm run start 来简单地启动我的 expo 应用程序,这实际上与运行 expo start 相同

这在浏览器和 CLI 中打开了 expo。几秒钟后expo 因错误断开连接:

Expo Developer Tools is disconnected from Expo CLI. Use the expo start command to start the CLI again.

在终端窗口中我发现了这个错误:

Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:178:28)

请注意,这是一个不同的问题:Expo Developer Tools is disconnected from Expo CLI. Use the expo start command to start the CLI again

研究后发现需要重新安装watchman

但是,运行 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.

安装结束时出现新错误:

==> 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.

现在做什么?

【问题讨论】:

    标签: xcode macos react-native expo watchman


    【解决方案1】:

    也许某些步骤不是必需的,但运行它们全部解决了问题:

    • 将 XCode 更新到最新版本(当前:12.5.1
    • 通过运行sudo rm -rf /Library/Developer/ 删除/Library/Developer/
    • 通过运行再次安装命令行开发工具:sudo xcode-select --install
      • 点击弹出窗口中的安装按钮,然后同意条款和条件
    • 打开 XCode 并允许安装其他工具
    • 运行brew update
    • 运行brew reinstall watchman - 这将最终更新watchman,并且将比之前运行以错误结束的相同命令花费更多的时间。

    现在我可以正常启动expo,并且它不再断开连接。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-12
      • 2018-05-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多