-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
'Failed to initialize watch plugin' when running tests for newly created app #11792
Comments
Hi @dannyskoog thanks for reporting,
All green |
@raix Thanks. Your steps seem equivalent. Let me try to scaffold a few more apps + try different variations of Node. Will report back once I've done so. |
I had the same issue with Node 14.7.0 but it's working fine with Node 16.1.0, on an intel mac book pro! |
I scaffolded a few new apps using different versions of Node (via nvm). And then ran 🔴 Error (Node So it seems quite clear that the issue is related to what Node version that is used and that the |
Okay. So I believe I found out the actual root cause behind the issue. I will explain:
And I tried out using Node TL;DR;
@raix It would be nice to update https://github.com/facebook/create-react-app/blob/main/packages/react-scripts/package.json#L12 to |
I noticed that there is a PR up for changing the minimum supported Node version to 16 #11747 That should take care of this issue 👍 |
since react-script 5 was meant to support 14, and now you're basically breaking that by saying you'll only support 16, don't you need to increment react-script to 6 now? |
the comand
work for me! thanks |
npm i -D --exact jest-watch-typeahead@0.6.5 works for me, thanks a lot |
@dannyskoog I think you wanted to link this https://github.com/jest-community/jest-watch-typeahead/blob/ba70243cded73d798102d6d6c3f9fd11a344c0d9/package.json#L96 instead for your second point |
Good catch. Updated 🙏 |
Error: Failed to initialize watch plugin "node_modules/jest-watch-typeahead/filename.js" npm i -D --exact jest-watch-typeahead@0.6.5 facebook/create-react-app#11792
This solution is working absolutely fine for me. |
npm i -D --exact jest-watch-typeahead@0.6.5 worked for me on Node version: 14.16.0 V |
worked for me |
|
Upgrading the node version worked for me. |
The command:
worked for me! Thanks 🙏 |
Describe the bug
Running tests (using
npm test
) for a newly created app throws the error:Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
https://create-react-app.dev/docs/troubleshooting/
Environment
node (via nvm):
14.15.4
npm (via nvm):
6.14.10
create-react-app:
5.0.0
Steps to reproduce
(Write your steps here:)
npx create-react-app my-app --template typescript
cd my-app
npm test
Expected behavior
Tests should be executed
Actual behavior
An error is thrown before the watcher is set up and tests are ran
Workaround
Running
npm i -D --exact jest-watch-typeahead@0.6.5
solves the problem (as suggested here #11043 (comment))The text was updated successfully, but these errors were encountered: