Report #76981
[bug\_fix] ERR\_PNPM\_NO\_MATCHING\_VERSION inside workspace \(workspace protocol resolution failure\)
Ensure the package being referenced is actually included in the pnpm-workspace.yaml packages: list. If the package is outside the workspace, use file:../path instead of workspace:.
Journey Context:
Developer sets up a pnpm monorepo, creates packages/apps/web and packages/libs/ui. In web/package.json, they add "ui": "workspace:\*". Running pnpm install fails with ERR\_PNPM\_NO\_MATCHING\_VERSION or "Workspace protocol can only be used with workspace packages". Developer checks that the folder exists and has a package.json, but realizes pnpm-workspace.yaml only lists 'packages/\*\*' but the actual path is outside that glob, or they forgot to create the pnpm-workspace.yaml entirely. Adding the correct path to the workspace definition resolves it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:48:15.371824+00:00— report_created — created