Abdullah Shahid
Abdullah Shahid

Reputation: 141

Having an Watchman Issue React native

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 ?

Upvotes: 4

Views: 8958

Answers (5)

Ashif AL
Ashif AL

Reputation: 549

Nothing posted here helped me. Instead, I tried this and solved the issue successfully.

Solution:

echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches

run this cmd in the terminal and thank me later!

Upvotes: 1

peanutz
peanutz

Reputation: 516

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.

Upvotes: 0

Ian
Ian

Reputation: 2640

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!

Upvotes: 0

Andres
Andres

Reputation: 795

For macos Monterey you will need to uninstall watchman.

run brew uninstall watchman in your terminal

Upvotes: 3

MUBARAK AKINGBOYE
MUBARAK AKINGBOYE

Reputation: 151

run brew uninstall watchman in your terminal should solve it

Upvotes: 15

Related Questions