React-Native 无法构建 DependencyGraph:Watchman 错误

ali*_*ian 4 android watchman react-native

当我想在 Android 模拟器上运行我的项目时出现此错误。

[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)
Run Code Online (Sandbox Code Playgroud)

我试过 "watchman watch ~path" , "sudo" & "chmod" 但他们没有帮助我。

有人可以建议我吗?

小智 9

通过重新安装watchman解决

brew update
brew reinstall watchman
Run Code Online (Sandbox Code Playgroud)


小智 2

cd AwesomeProject,执行chmod -R 777 *还是失败。在我向顶级目录授予权限后,它起作用了! chmod 777 AwesomeProject