Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Next.js and React

ESLint cannot find the shared config named react-app

ErrorESLint couldn't find the config "react-app" to extend from

Short 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.

  • Applies to eslint-config-react-app, ESLint 8, Node.js 22
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check whether the shared config package exists in the project at all.

    npm ls eslint-config-react-app eslint
  2. 2Match what you see, then jump to its fix

    1. 1npm ls prints (empty) for eslint-config-react-appThe eslint-config-react-app package is not installedFix
    2. 2npm 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. 3The package is installed but one entry fails to loadThe extends name has a typo or the jest preset is misnamedFix

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-app

2Fix

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.js

Confirmed by github.com

Did this fix it?

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 --version

2Fix

Pin ESLint to version 8, the version the package README installs it with.

npm install --save-dev eslint@^8.0.0

3Verify

Run ESLint again and check that it starts without the config error.

npx eslint src/App.js

Confirmed by github.com

Did this fix it?

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.json

2Fix

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.js

Confirmed by github.com

Did this fix it?

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:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.