尝试从xcode运行react-native run-ios
或构建RN项目时,地铁绑定程序一启动,终端中就会出现此错误:
Loading dependency graph...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: resolve_projpath: path `/Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA`: open: /Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA: Operation not permitted. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
events.js:183
throw er; // Unhandled 'error' event
^
Error: resolve_projpath: path `/Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA`: open: /Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA: Operation not permitted
at BunserBuf.<anonymous> (/Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA/node_modules/fb-watchman/index.js:95:23)
at emitOne (events.js:116:13)
at BunserBuf.emit (events.js:211:7)
at BunserBuf.process (/Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA/node_modules/bser/index.js:292:10)
at /Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA/node_modules/bser/index.js:247:12
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
这在Catalina更新之前从未发生过。从一开始,我就在我的项目的根目录中有了一个空的观察者配置文件。在第一次引导后更新,有一个弹出在终端上说了一些关于权限,但我不记得确切。我的终端在visual代码中也有一条通知说:“默认的shell更改为zsh”,运行chsh -s /bin/zsh
以更改,所以我做了。
我试过:
watchman watch-del-all
watchman server-shutdown
npm uninstall watchman
& npm uninstall -g watchman
发布于 2022-06-10 08:28:41
对我来说,上面的场景不起作用,所以我尝试用不同的解决方案来解决问题。(我使用的是MacBook Pro,芯片: Apple M1 pro)
首先,您必须更新Mac OS的设置。
系统首选项>>安全性&隐私>>隐私选项卡>>完整磁盘访问>>单击终端的锁图标>>复选框
有时使用此步骤您可以解决问题,但在此之后,如果您仍然面临问题,请使用以下链接:#1030 (评论)
https://stackoverflow.com/questions/58318341
复制相似问题