Having an Watchman Issue React native

Viewed 2454
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

I give permission to watchman and terminal in System Preferences > Security and Privacy Full Disk And also tried watch-del-all command and watchman shutdown-server command but still no success

I have mac os monetery need help ?

4 Answers

run brew uninstall watchman in your terminal should solve it

For macos Monterey you will need to uninstall watchman.

run brew uninstall watchman in your terminal

I had my repo in my Documents folder on my M1 macbook pro. This thread said to move it out of that folder and now it runs great!

One of the answers here mentioned placing the repo under Documents, but that did not work for me. Instead, I placed it under the Users/myuser/ directory and it worked.

Related