Skip to content
Latchkey

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

Common 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

  1. Add the eslint-config-* package (and any required plugins) to devDependencies.
  2. Commit the updated lockfile.
  3. Ensure CI installs dev dependencies before linting.
Terminal
npm install --save-dev eslint-config-airbnb-base

Do 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 extends target listed in devDependencies.
  • Commit the lockfile so CI installs the exact config packages.
  • Run the lint job with dev dependencies present.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →