Skip to content

[BUG] fix from https://github.com/npm/cli/pull/8222 doesn't maintain scheme of replaced repo URL #8324

@alexsch01

Description

@alexsch01

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions