我有React-native项目。当我想启动它时,我运行npm start
或yarn start
,得到的是:
$ yarn startyarn run v1.7.0
$ react-native-scripts start
11:36:37: Starting packager...
***ERROR STARTING PACKAGER***
No issue with doctor-watchman-version
No issue with doctor-problem-checking-watchman-version
No issue with doctor-both-app-and-exp-json
No issue with doctor-schema-validation
No issue with doctor-validate-asset-fields
No issue with doctor-schema-validation-exception
No issue with doctor-unversioned
No issue with doctor-versions-endpoint-failed
No issue with doctor-invalid-sdk-version
No issue with doctor-node-modules-missing
No issue with doctor-react-native-not-installed
Starting Metro Bundler on port 19001.
Metro Bundler ready.
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: too many pending cache jobs. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
如果我卸载wathcman Packeger,就会卡住。
创建.watchmanconfig
文件也无济于事。
(Linux Mint OS)
小时的搜索。我还没有找到解决方案:(
答案 0 :(得分:0)
尝试一下:
npm r -g watchman
brew update && brew upgrade
brew install watchman
答案 1 :(得分:0)
watchman shutdown-server
this GitHub issue发出的此命令对我有用
答案 2 :(得分:0)
尝试一下:
$ npm install
如果使用的是Visual Studio,则在视图底部有重新启动按钮。点击并运行