ETIMEDOUT Error while installing Node packages on Windows

前端 未结 10 848
日久生厌
日久生厌 2020-12-03 10:18

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

相关标签:
10条回答
  • 2020-12-03 10:47

    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
    
    0 讨论(0)
  • 2020-12-03 10:51

    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
    
    0 讨论(0)
  • 2020-12-03 10:54

    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.

    0 讨论(0)
  • 2020-12-03 10:58

    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
    
    0 讨论(0)
  • 2020-12-03 11:00

    I solved with:

    npm config set proxy null
    
    0 讨论(0)
  • 2020-12-03 11:02

    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.

    0 讨论(0)
提交回复
热议问题