【问题标题】:Having an Watchman Issue React native有一个 Watchman 问题 React Native
【发布时间】:2022-06-16 23:11:03
【问题描述】:
To reload the app press "r"
To open developer menu press "d"

jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
  Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
  Error: Watchman error: std::__1::system_error: open: /Users/abdullahshahid/Documents/caremiles-react-native-repo: Operation not permitted. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.
/Users/abdullahshahid/Documents/caremiles-react-native-repo/node_modules/metro-hermes-compiler/src/emhermesc.js:77
          throw ex;
          ^

Error: std::__1::system_error: open: /Users/abdullahshahid/Documents/caremiles-react-native-repo: Operation not permitted
    at BunserBuf.<anonymous> (/Users/abdullahshahid/Documents/caremiles-react-native-repo/node_modules/fb-watchman/index.js:95:23)
    at BunserBuf.emit (node:events:527:28)
    at BunserBuf.process (/Users/abdullahshahid/Documents/caremiles-react-native-repo/node_modules/bser/index.js:292:10)
    at /Users/abdullahshahid/Documents/caremiles-react-native-repo/node_modules/bser/index.js:247:12
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
Emitted 'error' event on WatchmanWatcher instance at:
    at Client.<anonymous> (/Users/abdullahshahid/Documents/caremiles-react-native-repo/node_modules/jest-haste-map/build/lib/WatchmanWatcher.js:172:10)
    at Client.emit (node:events:527:28)
    at BunserBuf.<anonymous> (/Users/abdullahshahid/Documents/caremiles-react-native-repo/node_modules/fb-watchman/index.js:107:12)
    at BunserBuf.emit (node:events:527:28)
    at /Users/abdullahshahid/Documents/caremiles-react-native-repo/node_modules/bser/index.js:249:12
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
  watchmanResponse: {
    error: 'std::__1::system_error: open: /Users/abdullahshahid/Documents/caremiles-react-native-repo: Operation not permitted',
    version: '2022.05.30.00'
  }
}

Node.js v18.2.0

我在 System Preferences > Security and Privacy Full Disk 中授予 watchman 和终端权限,还尝试了 watch-del-all 命令和 watchman shutdown-server 命令,但仍然没有成功

我有 mac os monetery 需要帮助吗?

【问题讨论】:

    标签: react-native npm npm-start


    【解决方案1】:

    在终端中运行brew uninstall watchman 应该可以解决它

    【讨论】:

      【解决方案2】:

      对于 macos Monterey,您需要卸载 watchman。

      在终端中运行 brew uninstall watchman

      【讨论】:

        猜你喜欢
        • 2020-02-22
        • 2018-06-26
        • 1970-01-01
        • 1970-01-01
        • 2021-07-05
        • 1970-01-01
        • 1970-01-01
        • 2021-05-28
        • 1970-01-01
        相关资源
        最近更新 更多