ESLint "Could not find config" to extend in CI
Your config extends (or imports) a shareable config package that is not installed in the CI environment. ESLint cannot resolve it and aborts before linting any files.
What this error means
ESLint fails with "Failed to load config X to extend from" (legacy) or "Cannot find module 'eslint-config-X'" (flat), naming a preset like airbnb or next.
ESLint
Oops! Something went wrong! :(
ESLint: 9.0.0
Error: Failed to load config "airbnb-base" to extend from.
Referenced from: /home/runner/work/app/app/.eslintrc.jsonCommon causes
The shareable config is a missing dependency
The preset is referenced in extends but not listed in package.json, so a clean npm ci on the runner never installs it.
It is a devDependency skipped by a production install
CI ran npm ci --omit=dev or --production, so the lint config and its peers were pruned.
How to fix it
Install the config and its peers
- Add the
eslint-config-*package (and any required plugins) to devDependencies. - Commit the updated lockfile.
- Ensure CI installs dev dependencies before linting.
Terminal
npm install --save-dev eslint-config-airbnb-baseDo not omit dev dependencies before lint
Lint configs are dev dependencies; install them in the lint job.
.github/workflows/ci.yml
- run: npm ci
- run: npx eslint .How to prevent it
- Keep every
extendstarget listed in devDependencies. - Commit the lockfile so CI installs the exact config packages.
- Run the lint job with dev dependencies present.
Related guides
ESLint "couldn't find an eslint.config file" (flat config) in CIFix ESLint v9 "ESLint couldn't find an eslint.config.(js|mjs|cjs) file" in CI - v9 defaults to flat config an…
ESLint "Parsing error: Cannot find module '@typescript-eslint/parser'" in CIFix ESLint "Parsing error: Cannot find module '@typescript-eslint/parser'" in CI - the TypeScript parser name…
ESLint "Definition for rule was not found" in CIFix ESLint "Definition for rule X was not found" in CI - your config references a rule whose plugin is missin…