pnpm "ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE" in CI
A package declares a workspace: dependency on a sibling at a version range that no package in the workspace satisfies. pnpm will not fall back to the registry for a workspace: dep, so install fails.
What this error means
A pnpm install step fails with "ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE In <pkg>: No matching version found for <dep>@<range> inside the workspace".
pnpm
ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE In packages/web: No matching version
found for @acme/ui@2.0.0 inside the workspaceCommon causes
The requested version is not the sibling's version
The dependent pins @acme/ui@2.0.0 but the workspace package @acme/ui is at 1.x, so no in-workspace version matches.
A merge left a mismatched version specifier
Resolving a package.json conflict produced a range the sibling package does not satisfy.
How to fix it
Align the specifier with the workspace version
- Check the sibling package's
versionin itspackage.json. - Set the dependent's range to match it, or use
workspace:*/workspace:^. - Re-run
pnpm install.
packages/web/package.json
{
"dependencies": { "@acme/ui": "workspace:^" }
}Update versions across the workspace
Bump the dependent ranges to the current sibling versions in one pass.
Terminal
pnpm -r updateHow to prevent it
- Use
workspace:*orworkspace:^so siblings track their local version. - Keep dependent ranges in sync when bumping a package version.
- Review
package.jsonversion specifiers after merge conflicts.
Related guides
pnpm "ERR_PNPM_FETCH_404" for a workspace package in CIFix pnpm "ERR_PNPM_FETCH_404" in CI - pnpm tried to fetch a package from the registry that should have resolv…
pnpm "ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL" in CIFix pnpm "ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL" in CI - a script run across the workspace with pnpm -r failed in…
pnpm "ERR_PNPM_OUTDATED_LOCKFILE" with --frozen-lockfile in CIFix pnpm "ERR_PNPM_OUTDATED_LOCKFILE" in CI - pnpm-lock.yaml does not match the package.json manifests and --…