[BUG] npm unpublish fails if scope is involved #5685
Labels
Bug
thing that needs fixing
Priority 1
high priority issue
Release 8.x
work is associated with a specific npm 8 release
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
The following command fails if .npmrc contains @someScope:registry=https://some.npm.registry/
npm unpublish @someScope/[email protected]
The command works though if .npmrc contains registry=https://some.npm.registry/
The weird thing is
npm publish
for the same package works if .npmrc contains @someScope:registry=https://some.npm.registry/Expected Behavior
The
npm unpublish
command should work like thenpm publish
command if package scope is defined.Steps To Reproduce
npm unpublish @someScope/[email protected]
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@someScope%2fsomePackage - Not found
npm ERR! 404
npm ERR! 404 '@someScope/somePackage' is not in this registry.
This is correct, though the package clearly is in the custom registry. And switching from @someScope:registry=https://some.npm.registry/ to registry=https://some.npm.registry/ makes unpublish work again.
Environment
The text was updated successfully, but these errors were encountered: