Watchman crawl failed. Retrying once with node crawler

大城市里の小女人 提交于 2019-12-05 00:09:51

问题


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-03-23T11:33:13,360: [0x7fff9755f3c0] the owner of /usr/local/var/run/watchman/root-state is uid 501 and doesn't match your euid 0


回答1:


You're running watchman as root but the state dir, which may contain trigger definitions and thus allow spawning arbitrary commands, is not owned by root. This is a security issue and thus watchman is refusing to start.

The safest way to resolve this is to remove the state dir by running:

rm -rf /usr/local/var/run/watchman/root-state

I'd recommend that you avoid running tools that wish to use watchman using sudo to avoid this happening again.




回答2:


Use sudo command to run watchman.

sudo npm run test

This problem arose because you might be running watchman as root.



来源:https://stackoverflow.com/questions/49443341/watchman-crawl-failed-retrying-once-with-node-crawler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!