Error: jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
See original GitHub issueDo you want to request a feature or report a bug? bug
What is the current behavior?
When running jest in watch mode on the root directory of the project, jest-haste-map throws an error:
$ yarn test --watch
Using globally installed version of Yarn
yarn run v1.12.1
$ node node_modules/fbjs-scripts/node/check-dev-engines.js package.json
$ cross-env NODE_ENV=test jest --watch
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: None of the files listed in global config root_files are present in path `/Users/procidac/Development/gh/facebook/draft-js/src` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
events.js:167
throw er; // Unhandled 'error' event
^
Error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/procidac/Development/gh/facebook/draft-js/src` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?
at BunserBuf.<anonymous> (/Users/procidac/Development/gh/facebook/draft-js/node_modules/fb-watchman/index.js:95:23)
at BunserBuf.emit (events.js:182:13)
at BunserBuf.process (/Users/procidac/Development/gh/facebook/draft-js/node_modules/bser/index.js:292:10)
at /Users/procidac/Development/gh/facebook/draft-js/node_modules/bser/index.js:247:12
at process._tickCallback (internal/process/next_tick.js:61:11)
Emitted 'error' event at:
at Client.client.on.error (/Users/procidac/Development/gh/facebook/draft-js/node_modules/jest-haste-map/build/lib/WatchmanWatcher.js:130:10)
at Client.emit (events.js:182:13)
at BunserBuf.<anonymous> (/Users/procidac/Development/gh/facebook/draft-js/node_modules/fb-watchman/index.js:107:12)
at BunserBuf.emit (events.js:182:13)
at /Users/procidac/Development/gh/facebook/draft-js/node_modules/bser/index.js:249:12
at process._tickCallback (internal/process/next_tick.js:61:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This is similar to https://github.com/facebook/create-react-app/issues/346
What is the expected behavior? Jest starts in watch mode without errors
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js? This is happening in draft-js master with Node v10.14.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:43
Top Results From Across the Web
Watchman crawl failed. Retrying once with node crawler
thakns Jai... First, Kill all the server running and close your terminal. Go to 'System preferences' -> 'Security & Privacy' -> privacy tab ......
Read more >How to solve Error jest-haste-map Watchman crawl failed.
Here is the solution on how to solve Error: jest-haste-map: Watchman crawl failed. Retrying once with node crawler when running Jest Test.
Read more >jest-haste-map: watchman crawl failed. retrying once with ...
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 ......
Read more >make sure watchman is running for this project
Loading dependency graphjest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running.
Read more >Loading dependency graph...jest-haste-map - appsloveworld
Coding example for the question Loading dependency graph...jest-haste-map: Watchman crawl failed-React Native.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had this issue and it was because my Mac OS upgrade had removed permissions which
watchmanneeded to watch files in theDocumentsdirectory. I went into System Preferences > Security & Privacy > Privacy > Files and Folders and manually gavewatchmanaccess.Mas OS version: 10.15.1 Jest version: 22.1.4 watchman version: 4.9.0
Based on @nigelrobbins3 remark above I ran
brew uninstall watchmanandbrew install watchmanto fix the problem.