Platinum Partner
architects,devops,networking,tool,tips and tricks,tools & methods,nodejs,npm

Using NPM Behind a Firewall

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 http://proxy.example.com:8080 
npm config set https-proxy http://proxy.example.com:8443

And there you go.

Published at DZone with permission of {{ articles[0].authors[0].realName }}, DZone MVB. (source)

Opinions expressed by DZone contributors are their own.

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}