Is there an existing issue for this?
This issue exists in the latest npm version
fix from #8222 doesn't maintain scheme of replaced repo URL
Output of $ npm config get
; "user" config from /home/deck/.npmrc
prefix = "/home/deck/.local"
; node bin location = /usr/bin/node-22
; node version = v22.15.0
; npm local prefix = /home/deck/test
; npm version = 11.4.1
; cwd = /home/deck/test
; HOME = /home/deck
; Run `npm config ls -l` to show all defaults.
Steps to reproduce [in Linux bash]
mkdir ThisIsATest
cd ThisIsATest
rm -rf package.json package-lock.json node_modules ~/.npm
npm install is-number
rm -rf node_modules ~/.npm
npm --loglevel verbose install --registry=http://localhost:8080/artifactory/api/npm/all-npm/
Current Behavior
Eventually, you'll see....
npm http fetch GET https://localhost:8080/artifactory/api/npm/all-npm/is-number/-/is-number-7.0.0.tgz
Expected Behavior
npm http fetch GET http://localhost:8080/artifactory/api/npm/all-npm/is-number/-/is-number-7.0.0.tgz
Other Information
http://localhost:8080 doesn't exist but either way the issue still happens