[BUG] `https-proxy` config doesn't work with authenticated proxy
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
when behind an authenticated http proxy, the following errors intermittently occur when attempting to npm install if using https

the only way around this seems to be to use http, which isn't ideal because it's being deprecated in a few days

since this issue is intermittent it's difficult for me to gather information to isolate the problem. it seems that deleting node_modules, running npm cache clean --force, and installing packages one at a time seem to sometimes effect the behavior, but i can't tell for sure
Expected Behavior
no errros
Steps To Reproduce
- run the following commands
npm config set proxy http://username:password@proxy.example.com:8080 npm config set https-proxy http://username:password@proxy.example.com:8080 - attempt to npm install (the errors occur intermittently, i can't reliably reproduce it) - see errors above
- run the following commands
npm config set registry http://registry.npmjs.org/ nom config set strict-ssl false - run
npm installagain, no errors
Environment
- OS: windows 10
- Node: 16.9.1
- npm: 7.24.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing npm install on Windows 10 with authenticated proxy and HTTPS settings, then investigate the intermittent errors. Done means authenticated HTTPS-proxy installs complete without errors or requiring HTTP, registry changes, or disabled strict SSL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100