facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.72k stars 994 forks source link

Watchman crawl failed. #947

Open padas2 opened 3 years ago

padas2 commented 3 years ago

Hello guys,

I have been using React-native for over a year on MacOs. It was working without a hitch for the past 14 months.

Recently enough(a couple of weeks back), the watchman service stopped working and now every time, I make a small code change, I have to stop the metro server and re-build the entire app just to see if the change has been reflected or not.

This is causing a huge drop in productivity. Could you please help me out in figuring out what the problem is.

Errors observed when running : react-native start --reset-cache

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: watchman::QueryExecError: query failed: synchronization failed: root dir was removed or is inaccessible. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.

Errors observed when running : react-native start

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: watchman::QueryExecError: query failed: synchronization failed: sync: creat(/Users/supreethpadavala/implatformmobile/.watchman-cookie-IM/<hostname>-600-1) failed: No such file or directory: No such file or directory. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.

I have tried out most of the popular suggestions present on the Web. Things which I have tried out:

  1. Re-installed node, re-installed watchman
  2. Granted 777 access to source code repo.
  3. Granted full disk access to Watchman and terminal from Security & Preferences options in MacOs.
  4. Ran the react-native command as sudo.

None of the above suggestions have helped me. Could you suggest any alternatives ?

Watchman version:

{
    "version": "2021.08.30.00"
}

MacOs version: 10.15.7