jest- hurry -map: Watchman爬行失败.用节点爬虫重试一次



我在运行react native metro时发现了一个错误它是在升级os

之后出现的。错误是

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 error: std::__1::system_error: open: /Users/dongjae/Desktop/wellCupOfficial/wellcupOfficial/wellcupApp: Operation not permitted. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.
/Users/dongjae/Desktop/wellCupOfficial/wellcupOfficial/wellcupApp/node_modules/metro-hermes-compiler/src/emhermesc.js:77
throw ex;

在谷歌上搜索并尝试了3个小时的解决方案后?我发现我必须加上"守望者"。到安全&隐私下的全磁盘访问

我还发现watchman是在dir opt/local/bin/watchman然而,最大的问题是,我没有办法访问这个文件夹我在选择窗口里都看不到这个文件夹请帮助这个可怜的开发人员。

试试这个,它为我工作

$ watchman watch-del-all
$ watchman shutdown-server

在项目的根目录下,运行watchman watch-del-all,然后运行watchman shutdown-server。下次运行应用程序时,系统会提示您是否可以访问watchman。这应该能解决问题。

希望对大家有所帮助。

您应该将整个项目目录移出文档或mac下载目录

https://github.com/facebook/watchman/issues/977

尝试移出桌面文件夹。我已经把我的项目移到了我的User文件夹,一切正常。

奇怪,是的。但至少现在,我可以继续编码。

在macOS上,我必须运行sudo yarn start,它工作,系统显示一个警报给watchman读权,接受yarn start后可以正常运行,不需要sudo。

重置项目

git reset—hard

删除Node模块

最新更新