Search code examples
node.jsproxynpmtunneling

npm install -> tunneling socket could not be established


This error message has been answered quite a few times on Stack Overflow, but all the solutions didn't work for me.

Whenever I do npm install I get the following message:

npm ERR! network tunneling socket could not be established, statusCode=407
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Repos\[repo-name]
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ECONNRESET

It has worked a lot of times before, but it suddenly stopped working. The only thing that has changed, that I can remember, is that I've installed VMWare Player. But I don't see why that is related.

Sometimes, instead of statusCode=407 the message say cause=Parse Error.

I've tried the following:

  • Setting the proxy with npm config set proxy and npm config set https-proxy
  • Changing the registry to http://registry.npmjs.org
  • Setting strict-ssl to false
  • Clearing npm's cache with npm cache clean

I'm out of options


Solution

  • Found my own solution.

    I changed my domain password a few days ago, I needed to update the cntlm ini file