I am trying to install node packages on my windows machine using npm from a fresh install of node.
however, I am getting ETIMEDOUT errors. I checked few other stacko
I solved it with the following:
npm config rm proxy
npm config rm https-proxy
npm config delete http-proxy
npm config delete https-proxy
set HTTP_PROXY=null
set HTTPS_PROXY=null
I was going through the same error. the root cause was the proxy settings : there are several answers provided in here to reset the proxy but none of them worked for me. Below commands solved my problem, give them a try.
npm config rm proxy
npm config rm https-proxy
You can try to throttle the number of simultaneous connections with the following command (for example 3 maximum simultaneous connections):
npm set maxsockets 3
The CLI has been allowing this option since npm@3.8.0. The default is 50 simultaneous connections max. See this link for further reference.
First see the npm config list:
npm config list
If you don't find http-proxy
, https-proxy
and proxy correctly
set, then
You need to configure npm to work with your web proxy. For example:
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
npm config set http-proxy http://proxy.company.com:8080
I solved with:
npm config set proxy null
First, run
npm config list
and check whether you are behind a proxy. If so, try running
npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy
as required
**If this method did not work, reinstall nodejs.