Skip to content
Latchkey

ESLint "Cannot find module 'eslint-config-...'" - Fix Shareable Configs

ESLint tried to load a shareable config your config extends and could not find it in node_modules. The config package is named in extends but was never installed - or only installed locally and not declared as a dependency.

What this error means

Linting fails with Cannot find module 'eslint-config-<x>' or Failed to load config "<x>" to extend from, naming the config. It is deterministic - a missing dependency, not flake.

eslint output
Oops! Something went wrong! :(
ESLint couldn't find the config "airbnb" to extend from. Please check that
the name of the config is correct.
The config "airbnb" was referenced from the config file in "/app/.eslintrc.json".

Common causes

Shareable config not installed

A config in extends (airbnb, next, prettier) maps to an eslint-config-* package not in package.json, so a clean install does not provide it.

Config's own peer deps missing

A shareable config requires peer packages (its parser/plugins). If those are absent, loading the config fails even when the config itself is present.

How to fix it

Install the config and its peers

Add the eslint-config-* package and the peer dependencies it requires.

Terminal
npm install -D eslint-config-airbnb \
  eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react
# 'extends: ["airbnb"]' resolves to eslint-config-airbnb

Verify the extends names

  1. Confirm each extends entry maps to an installed eslint-config-* package.
  2. Run npx eslint --print-config <file> to see what resolves.
  3. Install any peer plugins/parsers the config requires.

How to prevent it

  • Declare every shareable config and its peer deps in devDependencies.
  • Install with npm ci so CI matches the lockfile.
  • Use eslint --print-config to verify config resolution.

Related guides

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