Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
alexsch01 opened this issue May 26, 2025 · 4 comments
Closed
2 tasks done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@alexsch01
Copy link
Contributor

alexsch01 commented May 26, 2025

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

@alexsch01 alexsch01 added Bug thing that needs fixing Needs Triage needs review for next steps labels May 26, 2025
@alexsch01 alexsch01 changed the title [BUG] https://github.com/npm/cli/pull/8222 still replaces http with https [BUG] fix from https://github.com/npm/cli/pull/8222 doesn't maintain http:// May 26, 2025
@alexsch01
Copy link
Contributor Author

If this is intentional / npm requires https:// repositories, please close this issue

@alexsch01 alexsch01 changed the title [BUG] fix from https://github.com/npm/cli/pull/8222 doesn't maintain http:// [BUG] fix from https://github.com/npm/cli/pull/8222 doesn't maintain scheme of repo URL May 26, 2025
@alexsch01 alexsch01 changed the title [BUG] fix from https://github.com/npm/cli/pull/8222 doesn't maintain scheme of repo URL [BUG] fix from https://github.com/npm/cli/pull/8222 doesn't maintain scheme of replaced repo URL May 26, 2025
@milaninfy
Copy link
Contributor

@alexsch01 Please provide the reproduction steps for this specific instance, .npmrc file if any, npm configs, logs etc to see if it's an issue again.

@alexsch01
Copy link
Contributor Author

alexsch01 commented May 26, 2025

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/

Eventually, you'll see....

npm http fetch GET https://localhost:8080/artifactory/api/npm/all-npm/is-number/-/is-number-7.0.0.tgz

@alexsch01
Copy link
Contributor Author

#8330 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants