本文共 2340 字,大约阅读时间需要 7 分钟。
//启动后给的信息,watchman 起不来Looking for JS files in /Users/tomlucky/otherCode/RN/AwesomeProject Metro Bundler ready.Loading dependency graph... BUNDLE [android, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1)2018-01-09T18:09:37,917: [cli] unable to talk to your watchman on /usr/local/var/run/watchman/tomlucky-state/sock! (No such file or directory)Watchman: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2018-01-09T18:09:37,917: [cli] unable to talk to your watchman on /usr/local/var/run/watchman/tomlucky-state/sock! (No such file or directory)jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project. Error: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2018-01-09T18:09:37,917: [cli] unable to talk to your watchman on /usr/local/var/run/watchman/tomlucky-state/sock! (No such file or directory)2018-01-09T18:12:02,864: [cli] unable to talk to your watchman on /usr/local/var/run/watchman/tomlucky-state/sock! (No such file or directory)Watchman: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2018-01-09T18:12:02,864: [cli] unable to talk to your watchman on /usr/local/var/run/watchman/tomlucky-state/sock! (No such file or directory) ERROR watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2018-01-09T18:12:02,864: [cli] unable to talk to your watchman on /usr/local/var/run/watchman/tomlucky-state/sock! (No such file or directory)Loading dependency graph... BUNDLE [android, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1)Process terminated. Pressto close the window
$ brew install rmtree //我的这句报错,用的 //brew tap beeftornado/rmtree$ brew rmtree watchman$ sudo rm -rf /usr/local/var/run/watchman
$ git clone https://github.com/facebook/watchman.git$ cd watchman$ git checkout v4.7.0 //我用的时候,master就是4.7,所以没必要切branch$ ./autogen.sh$ ./configure$ make$ sudo make install
//我这个没用,直接就可以跑起来了。$ chmod 0700 /usr/local/var/run/watchman/-state
转载地址:http://sbcqi.baihongyu.com/