ESLint "couldn't find the plugin" - Fix Missing ESLint Plugins in CI
ESLint resolved a plugin name from your config but the corresponding eslint-plugin-* package is not installed. This is a missing dependency - the plugin is referenced but absent from node_modules.
What this error means
ESLint fails to start with ESLint couldn't find the plugin "eslint-plugin-<x>", usually adding "(The package was not found ...)". Nothing lints because the config cannot be assembled.
Oops! Something went wrong! :(
ESLint couldn't find the plugin "eslint-plugin-import".
(The package "eslint-plugin-import" was not found when loaded as a Node module
from the directory "/app".)Common causes
Plugin package not installed
The plugin is named in plugins/extends but missing from package.json, or a clean npm ci did not install it (only present locally before).
Pulled in transitively, not declared
The plugin only appeared as a transitive dependency of a shareable config; when that hoist changes, the direct reference can no longer resolve it.
How to fix it
Install the plugin as a dev dependency
npm install -D eslint-plugin-import
npm ls eslint-plugin-import # confirm it's a direct dependencyDeclare every referenced plugin
- List each
eslint-plugin-*you reference indevDependencies. - Do not rely on a shareable config to provide a plugin you also reference directly.
- Install with
npm ciso CI matches the lockfile exactly.
How to prevent it
- Declare all ESLint plugins directly in
devDependencies. - Avoid relying on transitive hoisting for plugins you reference.
- Use
npm cifor reproducible lint dependencies.