Reputation: 113
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..
Upvotes: 11
Views: 12080
Reputation: 1146
I was facing an issue that Watchman was not present in the list to allow for full disk access on Mac m1.
I managed to fix this by
+
button to add newMacintosh HD
from the folders listShift
+ Command
+ .
together to view all the directories listopt
> homebrew
> bin
(watchman is installed in this folder for MacOS Catalina)NOTE: If you do not find it here. open the terminal and run
> which watchman
This should give you the installed path for watchman.
Once I had watchman selected in the full disk access, I restarted my VSCode and the error was gone.
Upvotes: 1
Reputation: 829
try this it worked for me
$ watchman watch-del-all
$ watchman shutdown-server
Upvotes: 35
Reputation: 321
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.
Upvotes: 13
Reputation: 2464
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.
Upvotes: 0
Reputation: 149
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
Upvotes: 2
Reputation: 538
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.
Upvotes: 1
Reputation: 269
Reset your project
git reset --hard
Delete Node modules if you have to
Upvotes: -2