Using `npm` behind a proxy

Print Friendly and PDF
linux npm nodejs proxy

npm stands for Node Package Manager, and is the default package manager for the JavaScript runtime environment Node.js.

To permanently set the configuration we can do this.

npm config set proxy
npm config set https-proxy

If you need to specify credentials, they can be passed in the url using the following syntax.

To Redirect traffic to proxy.

npm --https-proxy= -g install npmbox
npm --https-proxy= -g install kafka-node

More Details.
Written on February 7, 2015