Skip to content
Latchkey

pnpm ERR_PNPM_NO_MATCHING_VERSION "No matching version found" - Fix in CI

ERR_PNPM_NO_MATCHING_VERSION is pnpm’s version-resolution failure: it fetched the package’s metadata but no published version satisfies the requested range.

What this error means

pnpm install fails with ERR_PNPM_NO_MATCHING_VERSION naming the package and range, and often listing the versions that do exist. The package is real; the requested range just does not match any of them.

pnpm output
ERR_PNPM_NO_MATCHING_VERSION  No matching version found for left-pad@^9.9.9
The latest release of left-pad is "1.3.0".
Other releases are: 1.2.0, 1.1.3, ...

Common causes

The requested range was never published

A typo or an over-eager pin targets versions that do not exist, so pnpm finds nothing to satisfy the range.

A stale or restricted registry/mirror

A mirror that has not synced a publish, or a private registry missing the version, reports no match even when the canonical registry has it.

How to fix it

Inspect versions and fix the range

pnpm lists existing versions in the error - pick one that exists.

Terminal
pnpm view left-pad versions
# then request a range that exists
pnpm add left-pad@^1.3.0

Refresh the registry view

  1. If using a mirror, confirm it synced the version or use the canonical registry.
  2. Clear the pnpm store/metadata cache if it is stale.
  3. Regenerate pnpm-lock.yaml after fixing the range.

How to prevent it

  • Pin to ranges that exist; let tooling propose upgrades.
  • Keep mirrors synced with the source registry.
  • Commit pnpm-lock.yaml so ranges resolve consistently.

Related guides

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