Closed
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
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
- With a proxy
- Set HTTPS_PROXY environment variable to the proxy URL
- Block access to the internet without a proxy (eg. windows firewall block 443 outbound)
- Try npm install any package
- 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)