-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Labels
Documentationdocumentation related issuedocumentation related issueNeeds Triageneeds review for next stepsneeds review for next steps
Description
Is there an existing issue for this?
- I have searched the existing issues
This is a CLI Docs Problem, not another kind of Docs Problem.
- This is a CLI Docs Problem.
Description of Problem
The workspaces documentation describes using the workspace: protocol to add a workspace as a
dependency of another workspace:
npm install b@workspace:* -w a
This will add an entry to workspace a's package.json like:
{
"dependencies": {
"b": "workspace:*"
}
}However, running this command on npm 11.6.4 (latest) results in:
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*
Steps to reproduce
- Create a monorepo with workspaces:
{
"name": "test-monorepo",
"workspaces": ["packages/a", "packages/b"]
}- Create packages/a/package.json and packages/b/package.json with valid package names
- Run: npm install b@workspace:* -w a
- Observe EUNSUPPORTEDPROTOCOL error
Potential Solution
Remove the workspace: syntax from the docs as this only applies to pnpm or yarn.
Affected URL
Septh, jogibear9988, AleksanderTech, EthanHonzikSPS, aameen951 and 1 moreAleksanderTech
Metadata
Metadata
Assignees
Labels
Documentationdocumentation related issuedocumentation related issueNeeds Triageneeds review for next stepsneeds review for next steps