-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] npm unpublish outputs OK | 0 | 200 when package version doesn't exist #7650
Comments
@AllanOricil I tested and it's working as expected. I believe could you please check the syntax
|
@milaninfy |
Behaviour is by design here, It exits correctly with code 0 if the version doesn't exist then it's effectively gone, however a logging would be useful here if the version doesn't exit. |
@milaninfy so NPM by design displays 200, OK and exit 0 when UMPUBLISH fails? weird.
This is clearly a new known error type "UNKNOWN VERSION" which has to be treated as: 400, NOT OK, 1 |
Hi @AllanOricil I gave a thumbs-up to the comment which diagnosed the error in the command you were running. I had read your description (thanks for the clear description) but hadn't spotted the extra I appreciate the lack of clues provided by the unpublish caused you some confusion and cost you some time. Perhaps you could change the title of this issue to more accurately describe what turned out to be the problem. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I just published v0.2.1 and I can't unpublish it. (less than 72h)
npm unpublish @namespace/package-name@vx.x.x -f
does not throw exception, but does not work. I unpublished my package and it still present in npm. Because of that, I can't publish that version againno error message, and this unpublish command doesn't work, even after
npm login
Expected Behavior
at least an exception should appear if I can't unpublish a package
Steps To Reproduce
npm unpublish @namespace/package-name@vx.x.x -f
Environment
//journeylab-tech-845044614340.d.codeartifact.us-east-2.amazonaws.com/npm/flowfuse/:_authToken = (protected)
//journeylab-tech-845044614340.d.codeartifact.us-east-2.amazonaws.com/npm/node-ready/:_authToken = (protected)
//registry.npmjs.org/:_authToken = (protected)
registry = "https://registry.npmjs.org"
; "project" config from /Users/ec2-user/node-ready-ascend-data-storage/.npmrc
@node-ready:registry = "https://registry.npmjs.org/"
; node bin location = /Users/ec2-user/.nvm/versions/node/v18.19.1/bin/node
; node version = v18.19.1
; npm local prefix = /Users/ec2-user/node-ready-ascend-data-storage
; npm version = 10.2.4
; cwd = /Users/ec2-user/node-ready-ascend-data-storage
; HOME = /Users/ec2-user
; Run
npm config ls -l
to show all defaults.The text was updated successfully, but these errors were encountered: