Skip to content

[BUG] unpublish from private registry #4331

Closed
@alberto-schena-gizero

Description

@alberto-schena-gizero

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

When trying to unpublish a package from a private registry, npm looks up from the package in https://registry.npmjs.org.

This is the output from the GitLab pipeline:

$ npm unpublish @foo/bar --force
npm WARN using --force Recommended protections disabled.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@foo%2fbar - Not found
npm ERR! 404 
npm ERR! 404  '@foo/bar' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-01-26T15_10_39_322Z-debug-0.log

Expected Behavior

It should unpublish @foo/bar package from private registry as configured within .npmrc file.

Note: It worked until a week ago (January 18th) using node:latest as pipeline base docker image.

Steps To Reproduce

  1. Set up a private registry
  2. Publish a package into the private registry
  3. Unpublish the package

Environment

  • npm: 8.3.2
  • Node.js: 17.4.0
  • OS Name: Linux
  • System Model Name: Debian Bullseye
  • npm config:
; "project" config from /builds/bar/.npmrc
@foo:registry = "https://baz.com:4873/" 
access = "restricted" 
registry = "https://registry.npmjs.org/" 
; node bin location = /usr/local/bin/node
; cwd = /builds/bar
; HOME = /root
; Run `npm config ls -l` to show all defaults.
; "publishConfig" from /builds/bar/package.json
; This set of config values will be used at publish-time.
access = "restricted"
cache = "~/.npm"
registry = "https://baz.com:4873"

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 1high priority issueRelease 8.xwork is associated with a specific npm 8 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions