pnpm/yarn "workspace:" Protocol Not Supported in CI
A package depends on a sibling via the workspace: protocol (e.g. "@acme/ui": "workspace:*"), but the tool installing it does not understand that protocol. Classically this is npm trying to install a pnpm/yarn workspace, or a published package that leaked an unresolved workspace: spec.
What this error means
Install fails with Unsupported URL Type "workspace:" or a "workspace: protocol not supported" message. It happens when the wrong package manager runs the install, or when a tarball published with workspace: ranges is consumed downstream.
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*Common causes
Wrong package manager for the workspace
The workspace: protocol is a pnpm/yarn/Bun feature. Running npm install over a repo that uses it (without npm workspaces support for that spec) fails to parse it.
Published package leaked workspace: ranges
When publishing, pnpm/yarn rewrite workspace: to real version ranges. If that rewrite was skipped (wrong publish flow), consumers see an unresolved workspace: spec.
How to fix it
Install with the matching package manager
Use the package manager that understands workspace: and the committed lockfile.
pnpm install --frozen-lockfile # pnpm repos
yarn install --immutable # yarn berry reposPublish with proper workspace rewriting
- Publish via
pnpm publish/yarn npm publish, which rewriteworkspace:*to concrete versions. - Never
npm publisha package that still containsworkspace:ranges. - Pin
packageManagerso CI and publish use the right tool.
How to prevent it
- Use one package manager per repo and pin it via
packageManager. - Publish with the tool that rewrites
workspace:to real ranges. - Commit the correct lockfile and install with
--frozen-lockfile/--immutable.