npm ERR! code EUNSUPPORTEDPROTOCOL — Unsupported URL Type "workspace:": workspace:*
npm met the workspace: protocol used by pnpm/yarn, which npm doesn’t support.
Seen on:
npm
Meaning
Monorepos using pnpm/yarn workspaces declare internal deps as workspace:*. Installing with npm fails.
Common causes
- Using npm in a pnpm/yarn workspace project
- Publishing without converting workspace: ranges
⚡ Quick fix
- Use the project’s package manager (pnpm/yarn)
- For npm workspaces, use plain version ranges (*)
Detailed fix by platform
npm
corepack enable && pnpm install
How to diagnose
- Manager — Which one does the repo use (lockfile)?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026