Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cryptic Error Message about "Watchman crawl failed" #428

Closed
epitaphmike opened this issue Jan 28, 2017 · 2 comments
Closed

Cryptic Error Message about "Watchman crawl failed" #428

epitaphmike opened this issue Jan 28, 2017 · 2 comments

Comments

@epitaphmike
Copy link

It seems I installed watchman via brew back in April 2005 when I was experimenting with React-Native. Since then I have not used watchman and completely forgot it was even installed.

That being said, this morning I was running Jest and I received this 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: unknown command watch-project. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.

I have the same repo on another machine without watchman installed and obviously did not receive the error.

It took some digging to figure out what the error was for, if it was Jest related or that I even had watchman installed.

I think it may be helpful in the error message to give a little more context. I am not sure if this is something that should be handled by the Jest team or Watchman team.

I just thought I would offer my two cents.

Thanks.

@wez
Copy link
Contributor

wez commented Jan 29, 2017

Most of that error text is produced by jest-haste-map, not from watchman; the only part from watchman is the Watchman error: unknown command watch-project text.

The problem here is that jest is using a feature that is only available in a more recent version of watchman than you had installed without checking whether it is supported properly.

I've opened jestjs/jest#2735 for the jest folks with advice on how to improve this.

To resolve the root cause of your issue, you just need to install the current version of watchman as is suggested in the troubleshooting guide URL that is printed out in that error message.

@epitaphmike
Copy link
Author

Thanks @wez. I appreciate you opening the other ticket. Hopefully issues like these will bring some of the development between facebook project teams together. Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants