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.
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.
npm install -D eslint-config-airbnb \
eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react
# 'extends: ["airbnb"]' resolves to eslint-config-airbnbVerify the extends names
- Confirm each
extendsentry maps to an installedeslint-config-*package. - Run
npx eslint --print-config <file>to see what resolves. - 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 ciso CI matches the lockfile. - Use
eslint --print-configto verify config resolution.