Skip to content
Latchkey

Serverless Framework "Serverless plugin ... not found" in CI

Serverless loads each plugin listed under plugins: from node_modules. One is not installed in CI, so loading the config fails before any deploy work begins.

What this error means

serverless deploy fails with "Serverless plugin \"serverless-esbuild\" not found. Make sure it's installed and listed in the \"plugins\" section of your serverless config file." even though it works locally.

serverless
Error:
Serverless plugin "serverless-esbuild" not found. Make sure it's installed and listed
in the "plugins" section of your serverless config file.

Common causes

Dependencies were not installed in CI

The job ran serverless without npm ci, so the plugin package is absent from node_modules.

The plugin is not a project dependency

The plugin is listed in plugins: but not in package.json, so a clean install never fetches it.

How to fix it

Install dependencies before deploy

  1. Add the plugin to package.json devDependencies.
  2. Run npm ci in the job before serverless.
  3. Re-run; the plugin loads from node_modules.
Terminal
npm ci
npx serverless deploy --stage prod

Add the plugin to package.json

Ensure every plugin under plugins: is a declared dependency so clean installs fetch it.

Terminal
npm install --save-dev serverless-esbuild

How to prevent it

  • Keep every plugins: entry in package.json.
  • Run npm ci before serverless in CI.
  • Commit the lockfile so plugin versions are reproducible.

Frequently asked questions

What causes ""plugin ... not found""?
The job ran serverless without npm ci, so the plugin package is absent from node_modules.
How do I fix "plugin ... not found"?
Install dependencies before deploy

Related guides

References

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