facebook / watchman

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

Promblem wih start watchman on Mac M1 #1056

Open BlackPony11 opened 1 year ago

BlackPony11 commented 1 year ago

When I start my react native app via npm start i got an Error jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running. Create an empty.watchmanconfigfile in your project's root folder or initialize a git or hg repository in your project. Error: Watchman error: std::__1::system_error: open: src: No such file or directory. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.

Watchman have all disk access. I also tried steps from https://github.com/facebook/watchman/issues/1030 this thread

Now even install with --HEAD option

watchman -v version: HEAD-f1d5061

MacBook Air (M1, 2020) macOS Monterey v:12.5 (21G72)

EmperorZzl commented 8 months ago

遇到了同样的问题

Marcosgois commented 7 months ago

Try this steps, now I'm at 2024.01.22.00 before this was 2023.08.28.00

  1. brew uninstall watchman
  2. brew update
  3. brew upgrade
  4. brew install watchman
  5. watchman shutdown-server
ThadeusAjayi commented 6 months ago

Try this steps, now I'm at 2024.01.22.00 before this was 2023.08.28.00

  1. brew uninstall watchman
  2. brew update
  3. brew upgrade
  4. brew install watchman
  5. watchman shutdown-server

Nice catch @Marcosgois Looks to me like the older version of watchman has an entry under Files and Folders in Privacy settings that is duplicated and does nothing. Screenshot 2024-02-28 at 11 57 18

After running: watchman shutdown-server, I started the react native server again and I got prompt to grant folder access to watchman for the folder I am running the application and it works alright. Screenshot 2024-02-28 at 11 57 36

phungvansyhb commented 2 days ago

i tried all these solutions above and didn't fix on mine, i tried with yarn and i worked :>>