Skip to content
Latchkey

ESLint "couldn't find the plugin" - Fix Missing ESLint Plugins

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.

eslint output
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 in the tree 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

Terminal
npm install -D eslint-plugin-import
npm ls eslint-plugin-import   # confirm it's a direct dependency

Declare every referenced plugin

  1. List each eslint-plugin-* you reference in devDependencies.
  2. Do not rely on a shareable config to provide a plugin you also reference directly.
  3. Install with npm ci so 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 ci for reproducible lint dependencies.

Frequently asked questions

What causes ""couldn't find the plugin""?
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).
How do I fix "couldn't find the plugin"?
Install the plugin as a dev dependency

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card