Cannot find module 'eslint-config-react-app'
See original GitHub issueIs this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
Didn’t try 4. I’m using lts/carbon with yarn.
Which terms did you search for in User Guide?
I looked through the user guide and found Usage in Create React App Projects which indicates that it should be available as part of Create React App.
Environment
node -v
: 8.9.3npm -v
: 5.5.1yarn --version
(if you use Yarn): 1.3.2npm ls react-scripts
(if you haven’t ejected): 1.0.17
Then, specify:
- Operating system: macOS 10.12.6
- Browser and version (if relevant): Chrome/N/A
Steps to Reproduce
(Write your steps here:)
create-react-app eslint-dep
cd eslint-dep
yarn global add eslint
echo '{"extends": "react-app"}' > .eslintrc
eslint src
Expected Behavior
I thought I’d have all the necessary eslint plugins to run eslint src with the react-app plugin.
Actual Behavior
Cannot find module 'eslint-config-react-app'
Referenced from: /Users/typeoneerror/Dev/eslint-bug/.eslintrc.json
Error: Cannot find module 'eslint-config-react-app'
This may be simply a dependency issue, but it may be a documentation issue as the eslint-config-react-app
package says I should have this already as part of CRA.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:10 (3 by maintainers)
Top Results From Across the Web
eslint in terminal Cannot find module 'eslint-config-react-app'
the linter works in create-react-app but now i want make it work in my sublimetext. Installed eslint yarn global add eslint (eslint v4.1.1...
Read more >eslint-config-react-app - npm
ESLint configuration used by Create React App. Latest version: 7.0.1 ... Start using eslint-config-react-app in your project by running `npm ...
Read more >Using globally installed "standard" package causes "Cannot ...
Using globally installed "standard" package causes "Cannot find module 'eslint-plugin-react'" error · npm install standard@14.3.1 -g · create a new project, ...
Read more >eslint-config-react-app - npm package - Snyk
The npm package eslint-config-react-app was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >eslint couldn't find the config "react-app" to extend from
If ESLint is not able to find the react-app config, there are likely conflicting or duplicate ESLint config dependencies that were installed outside...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop 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
Top GitHub Comments
For anyone else trying this, one solution is installing
eslint-config-react-app
globally, along with all of its peer deps. At the moment, that’s:You have to have the ‘eslint-config-react-app’ package in the same “scope” of your eslint installation. If you installed eslint globally (by using ‘npm install -g eslint’ or ‘yarn global add eslint’) you should do the same for “eslint-config-react-app”… if you installed locally (npm without -g or yarn without global), you should install the config package in the same way.