Skip to content
Latchkey

pnpm "ERR_PNPM_NO_MATCHING_VERSION" in CI

pnpm queried the registry and found no published version of the package that satisfies the range in your manifest or lockfile. It lists the versions that do exist so you can see the gap.

What this error means

pnpm install fails with "ERR_PNPM_NO_MATCHING_VERSION No matching version found for pkg@^X" followed by "The latest release of pkg is ...".

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.3.0

Common causes

The pinned range points at an unpublished version

A manifest requests ^99.0.0 but the highest published release is 1.3.0, so nothing satisfies the range.

A private version is missing from the configured registry

The version exists on an internal registry, but CI only has the public registry configured, so pnpm cannot see it.

How to fix it

Pin to a version that exists

  1. Read the "latest release" and "other releases" lines pnpm printed.
  2. Update the range in package.json to a published version.
  3. Re-run pnpm install to refresh the lockfile.
Terminal
pnpm add left-pad@^1.3.0

Configure the registry that hosts the version

For an internal package, add the scoped registry so pnpm resolves the private version in CI.

.npmrc
@acme:registry=https://npm.internal.example.com/
//npm.internal.example.com/:_authToken=${NPM_TOKEN}

How to prevent it

  • Commit pnpm-lock.yaml so resolved versions are known to exist before CI.
  • Configure scoped registries for private packages explicitly.
  • Avoid speculative version bumps that outrun published releases.

Related guides

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