Open webstech opened 1 year ago
Command succeeds just fine, just an erroneous log message
Command succeeds just fine, just an erroneous log message
Agreed, but unfortunately the user new to workspaces does not know the command succeeded. When there are no updates, the rest of the log looks the same as when -w
is not specified.
Also, the warning is issued for each workspace when running the command npm update --workspaces
.
Not sure if issue #5470 is related. Maybe the missing name
attribute in the virtual/real tree is causing the problem?
I agree, if the command works fine why is there a warning? I am not sure I even understand what the error is trying to say. Still seeing this with version 9.6.1.
Same on my end
➜ npm update --save -w @bln/eslint
npm WARN workspaces @bln/eslint in filter set, but no workspace folder present
changed 52 packages, and audited 1691 packages in 60s
273 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
as result
➜ git status
-------------------------------
M eslint/package.json
M package-lock.json
M package.json
M packages/.../package.json
M packages/.../package.json
M packages/.../package.json
M storybook/package.json
M test/package.json
I don't think it does work fine.
The issue is still present in NPM 10.x. This is a very irritating warning message, I am happy I at least found this issue.
And 6 months later, 2 hours trying to debug as I learn workspaces. With an incorrect warning message at every update/install/etc, def does not rate as a business grade feature.
Might seem minor to devs on the npm team but - This issue, and issues like this damage npm's reputation, and may reduce fund-ability by 3rd party orgs.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
The command
npm update -w foo/bar
gets unexpected outputnpm 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
Environment