jest-haste-map: Watchman crawl failed. Retrying once with node crawler

Viewed 2475

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

6 Answers

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.

try this it worked for me

$ watchman watch-del-all
$ watchman shutdown-server

Reset your project

git reset --hard

Delete Node modules if you have to

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.

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.

Related