5

I getting this error when I want to run my project on Android emulator.

[Hot Module Replacement] Server listening on /hot

React packager ready.

Failed to build DependencyGraph: Watchman error: query failed: synchronization failed: Permission denied. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
Error: Watchman error: query failed: synchronization failed: Permission denied. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
    at /Users/Ali/Desktop/app/Test/node_modules/react-native/node_modules/node-haste/lib/crawlers/watchman.js:63:11
    at process._tickCallback (node.js:368:9)

I tried "watchman watch ~path" , "sudo" & "chmod" but they didn't help me.

Can someone advise me please?

ali ajoudanian
  • 93
  • 1
  • 2
  • 9

5 Answers5

10

solved by reinstalling watchman

brew update
brew reinstall watchman
d0n
  • 101
  • 2
2

cd AwesomeProject, and execute chmod -R 777 * it still failed. after i give the permission to the top dir, it work! chmod 777 AwesomeProject

ben busy
  • 21
  • 1
  • 5
  • 1
    Recursively changing the owner of the relevant directory (whatever is referenced in the error) fixed it in my case. But before I tried that, I tried 777 perms, and that worked to. But 755 was liberal enough once I fixed the owner. – arnoldbird Apr 06 '18 at 00:35
2

check pid and kill

lsof -n -i4TCP:8081 | grep LISTEN

run this command with root

react-native start
duyCuong
  • 57
  • 1
  • 8
1

I've tried all the above and none of the solutions worked, try this:

type watchman watch ./

in the top directory of the RN project you want to run,

then again react-native run-ios

Frank
  • 19
  • 1
0

check pid

lsof -n -i4TCP:8081 | grep LISTEN

and kill pid

run with root

react-native start
duyCuong
  • 57
  • 1
  • 8