NPM doesn't install any modules: network socket hangs up

后端 未结 8 1838
醉酒成梦
醉酒成梦 2020-11-30 01:26

Salam (means Hello) :)

I have the latest version of node.js installed on ubuntu 12.04, I\'m not behind any proxies, and my network settings are correctly configured,

相关标签:
8条回答
  • 2020-11-30 02:13

    I tried multiple solution but most of cases happened with me is network/ssl and proxy issue.Network/ssl cases are very common and there are bunch of solution but with proxy thing I shared my fixes with you.

    Bash Commands:

    npm config set proxy null
    npm config set https-proxy null
    npm config set http-proxy null
    

    in my case I'm using https://registry.npmjs.org/ url. After NULL proxy its start working. npm set default proxy as http://my-proxy.com:1080/ so either we have to change proxy url or null it. To get your default proxy hit below command in your bash.

    npm config get proxy
    
    0 讨论(0)
  • 2020-11-30 02:13

    Find .npmrc file, open with note pad. then delete the proxy setting there

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