ETIMEDOUT Error while installing Node packages on Windows

前端 未结 10 849
日久生厌
日久生厌 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 11:03

    I was not able to install any packages before because of this error then after 1 hour, I finally resolved it because I was not behind a proxy but the proxy parameters got set in the npm config thats why that error was showing.

    I'am posting it because if anyone is facing the same issue and if they are not behind any proxy then they can use the following commands:-

    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 11:05

    I am posting this answer in case some one faces the same issue.

    I was able to solve this by running following command:

    npm config delete proxy
    
    0 讨论(0)
  • 2020-12-03 11:08

    For people working in corporates (where you cannot delete or edit the proxy configuration of the organization):

    There must be an .npmrc file in your users folder. If not, you can create one. This file can be edited to register the proxy settings of your organization. Contact your organization's IT team to get the relevant proxy details.

    Example of the .npmrcfile contents for my organization:

    strict-ssl=false
    registry=https://nexus.com/nexus/content/groups/npm-read/
    proxy=http://primary-proxy.gslb.intranet.com:8080/
    https-proxy=http://primary-proxy.gslb.intranet.com:8080
    

    This file can be found in your users folder:

    0 讨论(0)
  • 2020-12-03 11:09

    I tried all the suggested solutions I could find on GitHub forums and StackOverflow topics. Finally disabling my router's firewall solved the issue immediately.

    I am using Windows 10, node 4.0.0 and npm 2.13.4.

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