Report #100524
[bug\_fix] pnpm: ERR\_PNPM\_NO\_MATCHING\_VERSION workspace:\* not found
When referencing a workspace package, ensure the dependency name matches the workspace package's \`name\` field exactly and that the workspace package is included in \`pnpm-workspace.yaml\`. Use \`workspace:\*\` only for dependencies inside the same monorepo; do not publish with it unless your registry supports workspace protocol.
Journey Context:
Inside a pnpm monorepo you add \`"@myorg/utils": "workspace:\*"\` to \`apps/web/package.json\` and run \`pnpm install\`. pnpm throws \`ERR\_PNPM\_NO\_MATCHING\_VERSION\` or says the workspace package doesn't exist. You check \`packages/utils/package.json\` and realize its \`name\` is \`@myorg/util\` \(singular\) while your app asks for \`@myorg/utils\`. Or you forgot to add \`packages/\*\*\` to \`pnpm-workspace.yaml\`. Another variant: you try to publish the app and the registry rejects \`workspace:\*\` because npm doesn't understand pnpm's workspace protocol. The fix is aligning names, updating the workspace config, and replacing \`workspace:\*\` with a real semver range before publishing \(or using \`publishConfig\` to rewrite it\). The root cause is that \`workspace:\*\` is a pnpm-specific link protocol, not a semver range, and pnpm resolves it strictly against declared workspace members.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-02T04:39:09.764934+00:00— report_created — created