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