ESLint "Failed to load config to extend from" - Missing Config in CI
By Daniel Zoghalchali·Latchkey
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.
eslint
Oops! Something went wrong! :(
Error: Failed to load config "airbnb-base" to extend from.
Referenced from: /app/.eslintrc.json
Diagnose it: config resolution and version drift
Lint failures that appear only in CI are almost always a different linter version or a different resolved configuration, not new violations in the code.
Match the extends string to the package (config packages drop the eslint-config- prefix in extends).
Check the config's README for required peer plugins/parsers and install them.
Run npm ci so CI installs exactly what the lockfile pins.
How to prevent it
Declare every ESLint config and plugin in devDependencies.
Install with npm ci so the lint toolchain is reproducible.
Track a shareable config's peer-dependency list when adding it.
Frequently asked questions
What causes ESLint "Failed to load config to extend from"?
There are 2 common causes: shareable config not installed and wrong extends name or missing peers. A config like eslint-config-airbnb-base is referenced in extends but missing from node_modules (not in package.json, or a clean install dropped it).
How do I fix ESLint "Failed to load config to extend from"?
There are 2 fixes depending on which cause you have: install the config and its peers and use the correct extends name. Work through them in order, since the first is the most common.
What does ESLint "Failed to load config to extend from" actually mean?
ESLint fails immediately with Failed to load config "<x>" to extend from.
How do I stop ESLint "Failed to load config to extend from" happening again?
Declare every ESLint config and plugin in devDependencies. The prevention section lists 3 changes that keep it from recurring.