Skip to content
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

[BUG] NPM install ignores HTTPS_PROXY envvar #6957

Closed
2 tasks done
MikeDombo opened this issue Nov 2, 2023 · 2 comments
Closed
2 tasks done

[BUG] NPM install ignores HTTPS_PROXY envvar #6957

MikeDombo opened this issue Nov 2, 2023 · 2 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x

Comments

@MikeDombo
Copy link

MikeDombo commented Nov 2, 2023

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

NPM install is failing behind a proxy with the proper HTTPS_PROXY environment variable set. It works if I use --proxy option instead, but this is a regression from previous versions.

Expected Behavior

NPM should use the HTTPS_PROXY environment variable to connect to the registry through a proxy

Steps To Reproduce

  1. With a proxy
  2. Set HTTPS_PROXY environment variable to the proxy URL
  3. Block access to the internet without a proxy (eg. windows firewall block 443 outbound)
  4. Try npm install any package
  5. npm install fails with a FetchError due to EACCES

Environment

  • npm: 10.1.0
  • Node.js: 20.9.0
  • OS Name: Windows Server 2019
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here
FetchError: request to https://registry.npmjs.org/aws-iot-device-sdk-v2 failed, reason:
    at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
   at ClientRequest.emit (node:events:514:28)
   at _destroy (node:_http_client:875:13)
   at onSocketNT (node:_http_client:895:5)
   at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
@MikeDombo MikeDombo added Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x labels Nov 2, 2023
@sosoba
Copy link
Contributor

sosoba commented Nov 3, 2023

Try really latest version (10.2.3)

@wraithgar
Copy link
Member

This was fixed in v10.2.0 via #6858

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 Release 10.x
Projects
None yet
Development

No branches or pull requests

3 participants