2

I am trying to run npm install in my angular project but results in an error:

error network tunneling socket could not be established, cause=read ECONNRESET
error network This is most likely not a problem with npm itself
error network and is related to network connectivity.
error network In most cases you are behind a proxy or have bad network settings.

I tried to set the npm proxy like this:

npm config set proxy http://myproxy
npm config set https-proxy https://myproxy
npm config set registry "http://registry.npmjs.org/"

What am I missing or how can I run npm install?

Leeuwtje
  • 2,161
  • 5
  • 21
  • 28
  • possible duplicate of [Is there a way to make npm install (the command) to work behind proxy?](http://stackoverflow.com/questions/7559648/is-there-a-way-to-make-npm-install-the-command-to-work-behind-proxy) – nwinkler Jul 10 '15 at 12:29

1 Answers1

4

You should not use 'https' but 'http' as protocol when setting "https-proxy" in npm. Just do,

>npm config set https-proxy http://myproxy
Roshith
  • 2,116
  • 13
  • 21