今天啟動(dòng)RN服務(wù)的時(shí)候遇到問題:
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.
原因:
? ? 前兩天拉了一個(gè)新分支出來题造,弄了一下RN升級(jí)激挪;升級(jí)成功后提交到新版本分支绳匀;這時(shí)候在切換到老分支去啟動(dòng)服務(wù)奈惑,這時(shí)候發(fā)現(xiàn)完全沒法啟動(dòng)了,因?yàn)橹吧?jí)時(shí)候,有可能導(dǎo)致Watchman的一些配置被修改導(dǎo)致
解決辦法:
? ? 刪除整個(gè)node_modules目錄毫深,重新執(zhí)行npm install
? ? 成功后重新執(zhí)行npm run start 就OK!