10

I just found an error while running the metro of react native it came after upgrading the os

the error was

    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/dongjae/Desktop/wellCupOfficial/wellcupOfficial/wellcupApp: Operation not permitted. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.
/Users/dongjae/Desktop/wellCupOfficial/wellcupOfficial/wellcupApp/node_modules/metro-hermes-compiler/src/emhermesc.js:77
          throw ex;

after googling it and trying some soulutions for 3hours? i found that i had to add "watchman" to Full Disk Access under Security&Privacy

Also I found that watchman is in dir opt/local/bin/watchman However, the biggest problem is that I have found no way to access to this folder I can't even see this folder in the selecting window Please help this poor developer..

Dongjae0324
  • 103
  • 1
  • 4

6 Answers6

23

try this it worked for me

$ watchman watch-del-all
$ watchman shutdown-server
edrich13
  • 703
  • 6
  • 15
13

In the root of your project, run watchman watch-del-all, then run watchman shutdown-server. The next time you run the app you will be prompted to give access to watchman. This should resolve the issue.

2

Hope this will be helpful. worked for me.

You should move the entire project directory outside of the Documents or Download directory for mac

https://github.com/facebook/watchman/issues/977

manirikhi
  • 129
  • 1
  • 5
1

Try to move outside the Desktop folder. I've moved my projects to my User folder, and everything works.

Strange, yes. But at least at the moment, I can continue coding.

Nicolas
  • 530
  • 6
  • 9
0

On macOS I had to run sudo yarn start it worked and the system showed an alert to give watchman read rights, after accepting yarn start can run normally without sudo.

B. Mohammad
  • 2,152
  • 1
  • 13
  • 28
-2

Reset your project

git reset --hard

Delete Node modules if you have to