[BUG] Update command gets `workspaces <package name> in filter set, but no workspace folder present`
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 issue exists in the latest npm version
- I am using the latest npm
Current Behavior
The command npm update -w foo/bar
gets unexpected output
npm WARN workspaces @foo/bar in filter set, but no workspace folder present
This was shown in the output of issue #3960 here.
The warning is confusing. It suggests the workspace is not present or the npm configuration is incorrect.
The result is the same on both Windows and Linux (docker container).
Expected Behavior
It was expected the -w parameters would be processed without warnings.
The update command does complete but that is not initially obvious to the user.
Suppressing the warning would be great. Converting this issue to a documentation change would still be acceptable, making the message and cause visible. The outdated command does not have this issue.
Steps To Reproduce
- In this environment... anywhere?
- With this config... default?
- Run '...'
npm init
npm init -w foo/bar (set package name @foo/bar)
npm install
npm update -w foo/bar - See error...
npm WARN workspaces @foo/bar in filter set, but no workspace folder present
Environment
- npm: 9.1.1
- Node.js: v19.1.0
- OS Name: windows and linux
- System Model Name: personal build
- npm config: No custom data beyond author
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 by reproducing the warning with the listed npm init, npm init -w foo/bar, npm install, and npm update -w foo/bar commands, then trace how the update command processes the workspace filter. Compare the behavior with outdated and verify that updating @foo/bar completes without the confusing warning, or that the message and cause are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100