Watchman error: std::__1::system_error

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/xuyuanbei/Downloads/AwesomeProject: Operation not permitted. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.


RN项目文件下npm start 或者yarn ios 或者 react-native start 启动失败,终端报上面的错,然后手机或者模拟器的报错是

Could not connect to development server或者No bundle URL present 

开发环境是MacOs: 12.0.1 Monterey (M1) 不知道是不是M1的问题

解决方案就是更改项目目录的地址,把项目目录放到用户目录下面跟Downloads(下载),Documents(文稿)这些目录平级

这个问题在watchman的github上有issue地址是

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容