ESLint cannot find the shared config named react-app
ESLint couldn't find the config "react-app" to extend fromShort answer
extends: react-app tells ESLint to load the npm package eslint-config-react-app. Outside Create React App that package is not there unless you install it. Install it with ESLint 8, as its README documents, or check that the name, including react-app/jest, is spelled exactly.
Fix it fast
1Find out which cause you have
Check whether the shared config package exists in the project at all.
npm ls eslint-config-react-app eslint2Match what you see, then jump to its fix
- 1
npm ls prints (empty) for eslint-config-react-appThe eslint-config-react-app package is not installedFix - 2
npm ls shows eslint 9.x or later next to eslint-config-react-appESLint 9 or newer is installed and the project still uses .eslintrcFix - 3
The package is installed but one entry fails to loadThe extends name has a typo or the jest preset is misnamedFix
- 1
What does the error look like?
ESLint couldn't find the config "react-app" to extend from
Cause 1 of 3
The eslint-config-react-app package is not installed
1Check
Create React App ships this config for you. A project made some other way, or one where node_modules was rebuilt without the dev dependency, has nothing to load.
ls node_modules | grep eslint-config-react-app2Fix
Install the package together with ESLint in the version its README names, and keep the extends entry in your ESLint config file.
npm install --save-dev eslint-config-react-app eslint@^8.0.0
# .eslintrc.json
{ "extends": "react-app" }3Verify
Lint a file; the config error should be gone.
npx eslint src/App.jsConfirmed by github.com
Cause 2 of 3
ESLint 9 or newer is installed and the project still uses .eslintrc
1Check
The package README installs the config with eslint@^8.0.0. ESLint 9 made flat config (eslint.config.js) the default format, so an .eslintrc setup is not read the way it was in version 8.
npx eslint --version2Fix
Pin ESLint to version 8, the version the package README installs it with.
npm install --save-dev eslint@^8.0.03Verify
Run ESLint again and check that it starts without the config error.
npx eslint src/App.jsConfirmed by github.com
Cause 3 of 3
The extends name has a typo or the jest preset is misnamed
1Check
The README lists react-app and react-app/jest as the names to put in extends.
grep -n "react-app" .eslintrc* package.json2Fix
Use the names exactly as written in the README.
{ "extends": ["react-app", "react-app/jest"] }3Verify
Lint a test file.
npx eslint src/App.test.jsConfirmed by github.com
How do I stop it coming back?
- Keep eslint and eslint-config-react-app in devDependencies, in the same commit.
- Pin the ESLint major version your shared config supports before upgrading.
- Commit the lock file so CI installs the same set of packages.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- WorkforceA field app, an admin console and a self-hosted Node.js server for push and reconciliation.
Related fixes
Web apps
React shows Attempted import error when importing a component or function
Attempted import error:
The build found the file but not the name you asked for.
2 causes, each with a fixWeb apps
AxiosError Network Error with code ERR_NETWORK in a React app
Network Error
ERR_NETWORK means the request produced no readable response.
4 causes, each with a fixWeb apps
Axios get works with a URL string but ignores the object passed as the second argument
The server log shows a GET with no query string
axios.get takes a URL and an optional config object.
3 causes, each with a fixWeb apps
Can't resolve '../axios' in a React project
Module not found: Error: Can't resolve '../axios'
A path that starts with ./ or ../ is a file path, not the axios package.
3 causes, each with a fixWeb apps
Axios returns 401 from a React app but the login works elsewhere
Error: Request failed with status code 401
A 401 means the server received the request without valid credentials.
3 causes, each with a fixWeb apps
An axios call never finishes when the API server stops answering
code: 'ECONNABORTED'
Axios has no timeout unless you give it one: the default is 0, which means wait forever.
3 causes, each with a fix