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.
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
- Check published versions with pnpm view <pkg> versions.
- Set a range that actually exists and reinstall.
pnpm view left-pad versionsMap the package to the right registry
- For a scoped package, add the scope-to-registry mapping in .npmrc.
- Reinstall so pnpm queries the registry that has the version.
@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.