patrickmuhi Github contribution chart
patrickmuhi Github Stats
patrickmuhi Most Used Languages

Activity

11 Nov 2022

Patrickmuhi

started

Started On 11 Nov 2022 at 08:40:17

Patrickmuhi

started

Started On 11 Nov 2022 at 08:26:16

Patrickmuhi

started

Started On 11 Nov 2022 at 06:19:42
Issue Comment

Patrickmuhi

Error: jest-haste-map: Watchman crawl failed. Retrying once with node crawler.

Do 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

Forked On 26 Sep 2022 at 08:22:37

Patrickmuhi

First run watchman watch-del-all then run watchman shutdown-server fixed my issue

Commented On 26 Sep 2022 at 08:22:37