Error: Cannot find module 'react-dev-utils/ignoredFiles'
See original GitHub issueIs this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
Yes
Which terms did you search for in User Guide?
Cannot find module
Environment
node -v
: v6.10.0npm -v
: 4.6.1yarn --version
(if you use Yarn): 1.1.0npm ls react-scripts
(if you haven’t ejected): matrr-react-scripts@0.9.6
Then, specify:
- Operating system: Windows 10
- Browser and version (if relevant): Not relevant
Steps to Reproduce
- create-react-app matrr-test --scripts-version matrr-react-scripts
- cd matrr-test
- yarn start / npm start
Expected Behavior
The app was expected to compile and run, since I just ran start script without modifying anything. It was just a dry run test to see if everything would run.
Actual Behavior
I’ve customized the original react-script to include some other packages I constantly use and published it under matrr-react-script name on npm.
This package does nothing more than install latest versions of Material UI, React Router, Redux and other packages to help development flow. BTW, that’s where the name Matrr comes from (Material UI, Router, Redux).
Then I ran the steps written in Steps to Reproduce section and the result is the following screenshot.
NOTE: I just cleared the terminal (cmder, in my case) before running “yarn start”, but the installation went fine without errors.
Reproducible Demo
https://github.com/caiorg/matrr-app
Extra info
It seems the latest published version of react-dev-utils on npm is missing the aforementioned file.
I’ve tried to install just react-dev-utils and it comes without ignoredFiles.js.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
@caiorg, Master is 15 commits ahead of the release.
What I was saying is that you should:
And then, from the project you are consuming this custom react-script do:
or
npm install --save...
if you don’t use yarn yet (this needs to be done to update the custom react-scripts)After doing so, my
start
script stopped complaining about the ignoredFiles util, and I can confirm that react-scripts package.json still has the react-dev-utils version 4.2.1. I have never changes anything related to that.Look in your version control history, you need the version of
react-dev-utils
present when you cloned your repository.Try
"react-dev-utils": "^0.5.2"
.