Watchman crawl failed. Retrying once with node crawler

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.


April 2022 solution (testing with jest):

Step 1:

watchman watch-del-all

Step 2:

watchman shutdown-server

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

  1. First, Kill all the server running and close your terminal.
  2. Go to 'System preferences' -> 'Security & Privacy' -> privacy tab
  3. Scroll down and click 'Full Disk Access'
  4. Make sure you checked on 'Terminal' and 'Watchman'.
  5. Now relaunch terminal and simply try running again it works!!