ESLint "Failed to load config" - Fix Extends/Config Errors in CI
ESLint tried to load a config named in extends and could not find it. The shareable config package is not installed, or the name in extends does not map to an installed package.
What this error means
ESLint fails immediately with Failed to load config "<x>" to extend from. Referenced from: <path>. No files are linted because ESLint cannot assemble its configuration.
Oops! Something went wrong! :(
ESLint: 8.57.0
Error: Failed to load config "airbnb" to extend from.
Referenced from: /app/.eslintrc.jsonCommon causes
Shareable config not installed
A config like eslint-config-airbnb or eslint-config-prettier is referenced in extends but missing from node_modules (not in package.json, or a clean install dropped it).
Wrong extends name or its peer deps missing
The extends value does not match the package's expected name, or the config's required peer plugins/parsers are not installed, so loading it fails.
How to fix it
Install the config and its peers
Add the shareable config and any peer dependencies it requires.
npm install -D eslint-config-airbnb eslint-plugin-import \
eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooksUse the correct extends name
- Match the
extendsstring to the package (config packages drop theeslint-config-prefix inextends). - Check the config's README for required peer plugins/parsers and install them.
- Run
npm ciso CI installs exactly what the lockfile pins.
How to prevent it
- Declare every ESLint config and plugin in
devDependencies. - Install with
npm ciso the lint toolchain is reproducible. - Track a shareable config's peer-dependency list when adding it.