Lately the proxy configuration of my network has been changed, and moved from a transparent proxy, that required no configuration, to a “standard” proxy which requires a configuration script.

Unfortunately NPM doesn’t pick up the proxy configuration of Windows, and it took me a while to understand how to download node packages via NPM, so sharing here.

Basically you just run config set option of npm to set the proxy and https-proxy config keys, like this:

npm config set proxy
npm config set https-proxy

And here you go.

Tags: , ,