-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
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
The company I work for hosts our own NPM registry at https://example.domain.com/content/repositories/npmjs/
With version 11.2.0 and earlier running npm config set registry https://example.domain.com/content/repositories/npmjs/ allows packages to be installed.
With version 11.3.0 after running the above command it npm install attempts to fetch packages from https://example.domain.com/PATH_TO_PACKAGE instead of https://example.domain.com/content/repositories/npmjs/PATH_TO_PACKAGE
Expected Behavior
Install packages from path specified in npm config set registry
Steps To Reproduce
These steps assume you have a npm registry configured with a non root endpoint
- Install NPM version 11.3.0
- npm config set-registry https://example.domain.com/content/repositories/npmjs/
- npm install
NPM install returns a 404 as it is attempting to pull the package from https://example.domain.com/PATH_TO_PACKAGE instead of https://example.domain.com/content/repositories/npmjs/PATH_TO_PACKAGE
Environment
- npm: 11.3.0
- Node.js: 22.14.0
- OS Name: Oracle Linux
- System Model Name: OL8-Slim
- npm config:
;#24 1.145 ; "user" config from /root/.npmrc
#24 1.145
#24 1.145 registry = "https://example.domain.com/content/repositories/npmjs/"
#24 1.145
#24 1.145 ; node bin location = /usr/local/bin/node
#24 1.145 ; node version = v22.14.0
#24 1.145 ; npm local prefix = /app
#24 1.145 ; npm version = 11.3.0
#24 1.145 ; cwd = /app
#24 1.145 ; HOME = /root
#24 1.145 ; Run `npm config ls -l` to show all defaults. ```
(Taken from Docker Build) and removed company internal registry from domain