[DOCS] workspace: protocol documented but throws EUNSUPPORTEDPROTOCOL in npm 11.6.4
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the affected npm CLI v11 workspaces documentation URL and review the section describing workspace: dependencies against the npm 11.6.4 reproduction in this issue. Done means the npm documentation no longer presents the unsupported workspace: syntax as a working npm command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100