Reputation: 934
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 --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2018-03-23T11:33:13,360: [0x7fff9755f3c0] the owner of /usr/local/var/run/watchman/root-state is uid 501 and doesn't match your euid 0
Upvotes: 83
Views: 84780
Reputation: 2906
On mac, I was getting the error and tried the below first
watchman watch-del-all
watchman shutdown-server
It did not work, following troubleshooting documentation this worked:
watchman shutdown-server
brew update
brew reinstall watchman
Source: https://facebook.github.io/watchman/docs/troubleshooting
Upvotes: 0
Reputation: 39
just stop server then run command
watchman watch-del-all
watchman shutdown-server
Upvotes: 0
Reputation: 1
In my case, the issue was that 'watchman' wasn't listed under Full Disk Access in macOS settings. To resolve it, I manually added 'watchman' to Full Disk Access in the Privacy settings. Once I did that, everything worked perfectly.
Upvotes: 0
Reputation: 1730
The simplest way is to kill watchman server using the following command line:
watchman shutdown-server
Then you can remove the recored files changes using this command:
watchman watch-del-all
That's all.
Upvotes: 0
Reputation: 1730
A quick solution is to kill watchman server by entering this command line in your terminal:
watchman shutdown-server
Upvotes: 1
Reputation: 111
This error started to me when I ran the command npx react-native-clean-project
, and with this step mentioned above, my case was solutioned.
Step 1:
watchman watch-del-all
Step 2:
watchman shutdown-server
Upvotes: 11
Reputation: 624
// In jest.config.js, set watchmen to false.
module.exports = {
//other options ...
watchman: false,
};
Upvotes: 0
Reputation: 694
If you're not actually using watchman with Jest just set watchman: false
in your jest.config.js
to stop this message when running tests.
Upvotes: 3
Reputation: 121
watchman watch-del-all
watchman shutdown-server
Worked on MAC with no problem.
Upvotes: 8
Reputation: 3469
Testing with jest:
Step 1:
watchman watch-del-all
Step 2:
watchman shutdown-server
Upvotes: 290
Reputation: 997
watchman watch-del-all && rm -f yarn.lock && rm -rf node_modules && yarn && yarn start -- --reset-cache
Upvotes: 2
Reputation: 1
I set my .watchconfig file to be extra permissible: Add this code to your .watchmanconfig file
{
"ignore_dirs": [],
"fsevents_latency": 0.5,
"fsevents_try_resync": true
}
Upvotes: 0
Reputation: 61
check for .watchmanconfig and add this {}.
Inside the file .watchmanconfig
{}
Simple as that just try it.
Upvotes: 3
Reputation: 1
To solve this issue on my end, i had to stop the other node instance running on my other terminal. Just make sure you don't have another node running on your machine.
Upvotes: 0
Reputation: 1453
Put your project in a shared folder (ie, Macintosh HD/Users/Shared. I kept getting operation denied on the Desktop, because of further protection policies, even though Full Disk Access was granted.
Upvotes: 0
Reputation: 220
-June 8 2022
Giving Full Disk Access to all terminals or where you're getting started your server, is fixed the error. Also, it would be good to give access (Files and Folders) to VSC.
Happy Hacking!!!
Upvotes: 7
Reputation: 11941
On a Mac, remove all watches
and associated triggers of running process, then shutdown the service. See screenshot below:
Upvotes: 0
Reputation: 21
Step 1: $ npm cache clean --force
Step 2: Delete node_modules: $ rm -rf node_modules
Step 3: npm install
Step 4? (Optional): yarn start
/ npm start
This worked for me. Hopes it works for you too.
Upvotes: 2
Reputation: 289
As Jodie suggested above I tried the below and it worked well, for the benefit of others mentioning below steps which I tried in my mac to fix this issue
Upvotes: 18
Reputation: 23
I solved this, on linux by using the following commands on terminal.
$ echo 256 | sudo tee -a /proc/sys/fs/inotify/max_user_instances
$ echo 32768 | sudo tee -a /proc/sys/fs/inotify/max_queued_events
$ echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
$ pkill node
Then:
$ npm start
or
$ expo start (if you are using expo)
Upvotes: 2
Reputation: 31
I had a real issue with this one but finally found the answer.
Here's a screenshot of the post that helped me.
https://github.com/facebook/watchman/issues/751#issuecomment-542300670
The whole forum has multiple different solutions which I hadn't actually tried, but this one is the solution that worked for me! Hope this helps.
Upvotes: 3
Reputation: 4987
You're running watchman as root but the state dir, which may contain trigger definitions and thus allow spawning arbitrary commands, is not owned by root. This is a security issue and thus watchman is refusing to start.
The safest way to resolve this is to remove the state dir by running:
rm -rf /usr/local/var/run/watchman/root-state
I'd recommend that you avoid running tools that wish to use watchman using sudo
to avoid this happening again.
Upvotes: 34