-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
--watch Now Throws an Error #8088
Comments
You can probably install This is probably because we removed the |
@SimenB I'd rather not do that. Like I said in the initial issue, that seems to be masking an actual issue with jest. If I install watchman, reproducing the problem becomes harder. |
Sure, I was just trying to unblock you |
I tried to run it with |
Closing as duplicate of #8084 |
This is the error I get when running
FYI |
I see. Thank you for the clarification! I didn't get that MUCH more specific error when I'm running locally, but I agree, the root cause seems to be the same as #8084. |
Seems this is still an issue for folks |
It is, yes. Jest 23 worked fine. As soon as I updated to Jest 24 24.4.0 it started breaking. |
@yoshicarroll what version of macOS are you running? I'm starting to think that is the common thread. |
@arb High Sierra 10.13.6 |
Interesting, well it's not that then; I'm on |
I don't know anything about Jest internals, but if someone can point me to where to set a breakpoint and collect some info, I have some time to help out. |
I was able to alleviate the issue in my project that is experiencing this by configuring the https://jestjs.io/docs/en/configuration.html#watchpathignorepatterns-array-string |
Can confirm this workaround gets around the problem. Make sure you specify the value on the project config if you're using multiple projects. I still believe there needs to be a code fix for this as it was working in version 23, but this is a good workaround for the current problem! 👍 |
My guess is that this is caused by #8048. Maybe we can get sane to re-add fsevents seeing as it'll be easier to install in tue future? |
I had issue I see here using jest and the only way I could fix that was installing watchman.
If now is necessary we install watchman to run jest, why that information isn't in Jest website (or documentation)? I needed to do a long research till I get here. Including that information into Jest page installation instruction would make jest user's life a lot easier. Why not just include this information somewhere in Jest website? |
I'm learning react and I was testing redux actions, I installed es-lint to project (for no reason) and start getting the same error. Deleted node-modules and removed es-lint from the project. Everything went back to normal. I don't think this information helps you at all :), but just wanted to let you know es-lint might be part of the issue as well for you guys too. |
This issue is a blocker for next Create React App release, which by itself blocks several important updates (including React Hooks lint rules). If we can't resolve it on the I'm worried about the path forward here. |
I wonder if we can solve this in EDIT: We can probably just vendor it for now, we already vendor their watchman implementation (https://github.com/facebook/jest/blob/2bc62803ba457a3139c9533835a6888a824ddf4f/packages/jest-haste-map/src/lib/WatchmanWatcher.js) EDIT2: pasted wrong link above originally, now fixed |
@SimenB why are we watching node_modules by default? I understand doing it when Watchman makes it “free”, but otherwise...? Is there historical context I’m missing? |
@scotthovestadt you may ask @cpojer about that, but if we could only watch node_modules by default when watchman is enabled, that would be nice. |
Or just a shallow watch of the folder, which would be nice because it would catch new modules. I’ll take a look today. |
No idea, maybe @cpojer can chime in. But I guess the point is, since watchman makes it free, they should behave as close as possible? If it's blocking CRA though, they can probably configure Jest to not watch |
People get upset when we aren't watching node_modules because people tend to change them manually. |
I'm not sure that ignoring |
Fix out in 24.7.0 |
having same error jest@24.8.0, but using 24.7.1 is ok |
That's a different error then, please open up a new issue |
so you already known the error? but I reinstall jest@24.8.0, the error has gone |
No, but the error talked about in this issue has been fixed. |
I confirm that ignoring the node_modules worked again: {
"watchPathIgnorePatterns": ["node_modules"]
} jest@24.8.0 doesn't solve the issue for me :/ |
Problem still exists in jest@24.9.0 but configuring watchPathIgnorePatterns to ignore node_modules does fix. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
I recently updated jest to
24.3.1
and now running with--watch
throws an error and does not start. The error is:I do not have watchman installed globally and again, this was working yesterday and now it's not. I feel like it's an issue with the macOS update but I can't confirm. I know installing watchman via brew is a suggested solution but I've never had to do that before and that seems kind of like it's masking a possible issue with jest.
To Reproduce
Expected behavior
I expected jest to continue to work correctly as it has before I updated.
Link to repl or repo (highly encouraged)
https://github.com/arb/celebrate/tree/feature-ref this is the branch I'm working with and currently exhibiting the above behavior.
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: