React-scripts test command not working
See original GitHub issueDescribe the bug
react-scripts test
command stopped working after update to ^4.0.3 from ^3.0.0.
It shows this error on terminal:
● Validation Error:
Watch plugin jest-watch-typeahead/filename cannot be found. Make sure the watchPlugins configuration option points to an existing node module.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
error Command failed with exit code 1.
Nothing has changed on the code. Only react-scripts package. Tests were working fine before the update. The project is not ejected and it is not intended to be.
Did you try recovering your dependencies?
Yes, I tried. yarn version: 1.22.10
Which terms did you search for in User Guide?
I’ve search for ‘react-scripts test’ and ‘watchPlugins’ and all I found is that I need to eject the project. I don’t understand why. It was never like that. So I think that is not the solution to the problem.
Steps to reproduce
- Open a terminal on the CRA project root
- Run
yarn
- Run
yarn test
Expected behavior
I expect tests run fine. Like before updating to ^4.0.3.
Actual behavior
react-scripts test
command stops working after update react-scripts library to ^4.0.3 from ^3.0.0.
It shows this error on terminal:
● Validation Error:
Watch plugin jest-watch-typeahead/filename cannot be found. Make sure the watchPlugins configuration option points to an existing node module.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
error Command failed with exit code 1.
Thank you 😄
Issue Analytics
- State:
- Created 2 years ago
- Reactions:22
- Comments:19
Top Results From Across the Web
react-scripts: command not found
I have installed create-react-app and then when I change into the directory and hit npm start I get a react-scripts: command not found...
Read more >Fix: React Scripts Command not Found Error - αlphαrithms
Fix 1: Run npm install. In the case where an app might have been cloned, the node_modules directory would not have been copied....
Read more >react-scripts: command not found error [Solved]
Run the npm install react-scripts command to solve the "react-scripts: command not found" error. If necessary delete your node_modules directory and your ...
Read more >Fix: React Scripts Command not Found Error | by Zack West
Fix: React Scripts Command not Found Error · Quick Intro: React Apps Setup 101 · The Problem: Running a React-Scripts Command · Fix...
Read more >How to fix the react-scripts command not found Error
How to fix the react-scripts command not found Error · First, delete the node_modules folder in your project (if you have one) using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
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 have had the same issue and one important thing to notice is that the newest released version of
jest-watch-typeahead
is now written in native ESM and will break with the following error:Error [ERR_REQUIRE_ESM]: Must use import to load ES Module
Make sure to install the version compatible with Jest 26 e non native ESM modules.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.