Skip to content
Latchkey

Prettier "Cannot find plugin" - Fix Missing Prettier Plugins in CI

Prettier tried to load a plugin named in your config and could not find it. The plugin is referenced in .prettierrc (or the prettier key) but was never installed - or only installed locally and not declared as a dependency.

What this error means

Running Prettier (directly or via prettier --check in CI) fails with Cannot find plugin "<x>" or Couldn't resolve plugin "<x>", naming the plugin from your config.

prettier output
[error] Cannot find plugin "prettier-plugin-tailwindcss". Did you forget to
install it?
[error] Resolved config from '/app/.prettierrc' references a missing plugin.

Common causes

Plugin not installed

A plugin listed in .prettierrc plugins (e.g. prettier-plugin-tailwindcss, @prettier/plugin-php) is not in package.json, so a clean install does not provide it.

Plugin path/name wrong

A misspelled plugin name, or a path-style reference that does not resolve from the config location, fails to load.

How to fix it

Install the plugins your config lists

Add every plugin named in .prettierrc as a dev dependency.

Terminal
npm install -D prettier prettier-plugin-tailwindcss
npm ls prettier-plugin-tailwindcss

Reference plugins by resolvable name

List the installed package name in the config.

.prettierrc
// .prettierrc
{ "plugins": ["prettier-plugin-tailwindcss"] }

How to prevent it

  • Declare every Prettier plugin in devDependencies.
  • Install with npm ci so CI matches the lockfile.
  • Keep .prettierrc plugins entries pointed at installed packages.

Frequently asked questions

What causes ""Cannot find plugin""?
A plugin listed in .prettierrc plugins (e.g. prettier-plugin-tailwindcss, @prettier/plugin-php) is not in package.json, so a clean install does not provide it.
How do I fix "Cannot find plugin"?
Add every plugin named in .prettierrc 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