Skip to content
Latchkey

semantic-release "Cannot find module '@semantic-release/...'" plugin in CI

semantic-release loads each plugin named in its config. If a plugin like @semantic-release/git or @semantic-release/changelog is referenced but not installed, Node cannot resolve it and the run fails with "Cannot find module".

What this error means

The run fails at startup with "Cannot find module '@semantic-release/git'" or "Cannot find package" for a plugin listed in the config.

semantic-release
[semantic-release] > Error: Cannot find module '@semantic-release/git'
Require stack:
- /home/runner/work/app/node_modules/semantic-release/index.js

Common causes

A non-default plugin is not in devDependencies

Plugins beyond the default set (git, changelog, exec) must be installed explicitly; the config references one that was never added.

The install step skipped dev dependencies

The job ran npm ci --omit=dev or --production, so the release plugins in devDependencies were not installed.

How to fix it

Install the referenced plugin

  1. Add each non-default plugin to devDependencies.
  2. Run a full install (not production-only) in the release job.
  3. Re-run so all configured plugins resolve.
Terminal
npm install --save-dev @semantic-release/git @semantic-release/changelog

Do not omit dev dependencies in the release job

Ensure the install includes devDependencies so the plugins are present.

.github/workflows/release.yml
- run: npm ci

How to prevent it

  • Add every configured plugin to devDependencies.
  • Use npm ci (with dev deps) in the release job.
  • Pin plugin versions alongside the semantic-release version.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →