React-Native Failed to build DependencyGraph: Watchman error
Asked Answered
A

5

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?

Adige answered 22/5, 2016 at 5:39 Comment(5)
This may help you github.com/facebook/react-native/issues/2564Radiator
I used that but it didn't work.Adige
Hey.. Got any solution?Radiator
Not until now. But try this one , it maybe helps you. https://mcmap.net/q/1885168/-react-native-failed-to-build-dependencygraph-watchman-errorAdige
I had the same problem and rebooting the laptop fixed it for me.Keene
B
10

solved by reinstalling watchman

brew update
brew reinstall watchman
Bloodless answered 12/7, 2016 at 2:58 Comment(0)
D
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

Draghound answered 23/5, 2016 at 23:17 Comment(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.Tigre
T
2

check pid and kill

lsof -n -i4TCP:8081 | grep LISTEN

run this command with root

react-native start
Tenebrae answered 30/9, 2016 at 17:28 Comment(0)
J
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

Jewelljewelle answered 20/6, 2017 at 23:50 Comment(0)
T
0

check pid

lsof -n -i4TCP:8081 | grep LISTEN

and kill pid

run with root

react-native start
Tenebrae answered 30/9, 2016 at 17:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.