ReactNative在运行的时候遇到Watchman crawl failed问题

今天启动RN服务的时候遇到问题:

jest-haste-map: Watchman crawl failed. Retrying once with node crawler.

Error: Watchman error: resolve_projpath: none of the files listed in global config root_files are present in path/Users/vjeux/random/testor any of its parent directories. Make sure watchman is running for this project. Seehttps://facebook.github.io/watchman/docs/troubleshooting.html.

原因:

    前两天拉了一个新分支出来,弄了一下RN升级;升级成功后提交到新版本分支;这时候在切换到老分支去启动服务,这时候发现完全没法启动了,因为之前升级时候,有可能导致Watchman的一些配置被修改导致

解决办法:

    删除整个node_modules目录,重新执行npm install

    成功后重新执行npm run start 就OK!

你可能感兴趣的:(ReactNative在运行的时候遇到Watchman crawl failed问题)