Skip to content
Latchkey

pnpm ERR_PNPM_NO_MATCHING_VERSION in CI - Fix Unresolvable Version Range

ERR_PNPM_NO_MATCHING_VERSION means pnpm asked the registry for a version range and got no version that satisfies it. The range, the package name, or the registry is wrong.

What this error means

pnpm install fails with ERR_PNPM_NO_MATCHING_VERSION, listing the package and the requested range alongside the versions that are actually available.

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

Common causes

The requested range does not exist

A typo or an over-eager bump asks for a version that was never published.

The wrong registry is being queried

A scoped package is resolved against the public registry instead of the private one that hosts the requested version.

How to fix it

Correct the version range

  1. Check published versions with pnpm view <pkg> versions.
  2. Set a range that actually exists and reinstall.
Terminal
pnpm view left-pad versions

Map the package to the right registry

  1. For a scoped package, add the scope-to-registry mapping in .npmrc.
  2. Reinstall so pnpm queries the registry that has the version.
.npmrc
@acme:registry=https://registry.acme.internal/

How to prevent it

  • Pin versions that exist, configure scoped-registry mappings in .npmrc, and let renovate or dependabot bump ranges so they always point at published versions.

Related guides

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