在安装非标准自制软件时安装 watchman

arv*_*sim 5 homebrew watchman

我正在使用 React Native,它需要watchman. 运行时react-native run-ios,我看到此错误。

watchman --no-pretty get-sockname returned with exit code=1, signal=null, 
stderr= 2017-05-05T08:17:49,256: [2110218240] while computing sockname: 
failed to create /usr/local/var/run/watchman/foo-state: No such file or directory
Run Code Online (Sandbox Code Playgroud)

经过调查后,这似乎是由于没有/usr/local/安装标准自制程序造成的。

statedir他们是改变守望者所使用的方式吗?

ngo*_*aum 0

watchman --help

 --statefile=PATH       Specify path to file to hold watch and trigger state
Run Code Online (Sandbox Code Playgroud)

所以我认为你需要使用这个--statefile选项。