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

6

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

Nicolenicolea answered 7/6, 2022 at 6:46 Comment(0)
I
32

try this it worked for me

$ watchman watch-del-all
$ watchman shutdown-server
Imparisyllabic answered 6/9, 2022 at 6:48 Comment(3)
why does this work?Cacus
This didn't work for meThither
you save my lifeCm
A
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.

Alicia answered 27/7, 2022 at 21:36 Comment(0)
G
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

Gillie answered 2/7, 2022 at 23:39 Comment(0)
A
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.

Antho answered 8/6, 2022 at 13:2 Comment(1)
This is working, but as you said it's strange.Fadeless
P
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.

Probability answered 6/7, 2022 at 16:59 Comment(0)
B
-2

Reset your project

git reset --hard

Delete Node modules if you have to

Baliol answered 7/6, 2022 at 7:46 Comment(1)
You'd also want to check watchmanconfig file if there are any breaking changesBaliol

© 2022 - 2024 — McMap. All rights reserved.