You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you run npm publish -ws, it will go through and publish all those packages. However, if one of those packages is not updated, the command will fail since NPM rejects publishing the same version.
Expected Behavior
Running npm publish -ws will keep publishing the other packages even if one fails
Steps To Reproduce
Create a workspace with three packages (A, B, C)
Bump the versions for A and C
Run npm publish -ws
B will fail to publish and npm will not try to publish C
Environment
npm: 10.8.3
Node.js: v22.9.0
OS Name: MacOS
System Model Name: Macbook Pro
npm config:
; "user" config from /Users/manchuck/.npmrc
//registry.npmjs.org/:_authToken = (protected)
save-exact = true
save-prefix = ""; node bin location = /Users/manchuck/.nvm/versions/node/v22.9.0/bin/node; node version = v22.9.0; npm local prefix = /Users/manchuck/Projects/vonage/node-sdk; npm version = 10.8.3; cwd = /Users/manchuck/Projects/vonage/node-sdk/packages; HOME = /Users/manchuck; Run `npm config ls -l` to show all defaults.
The text was updated successfully, but these errors were encountered:
I am opening this as an issue again because if this is intended, then it is poorly implemented. As a workaround for this, a user now has to run a bash script to publish packages when there is no change in the version number for one package in the monorepo:
foriin$(ls -d *) ─╯
(cd $i&& npm publish)
I'm not sure how this is a breaking change for a fix. Even if this was some breaking change, the remedy is to just add a new flag that can adjust the behavior without changing how it works. Something like --ignore-publish-fail
manchuck
changed the title
[BUG] <title>
[BUG] npm publish -ws is failing
Nov 13, 2024
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When you run
npm publish -ws
, it will go through and publish all those packages. However, if one of those packages is not updated, the command will fail since NPM rejects publishing the same version.Expected Behavior
Running
npm publish -ws
will keep publishing the other packages even if one failsSteps To Reproduce
Create a workspace with three packages (A, B, C)
Bump the versions for A and C
Run
npm publish -ws
B will fail to publish and npm will not try to publish C
Environment
The text was updated successfully, but these errors were encountered: