Tuesday, March 19, 2013

Connecting to the node package repository behind an authenticated proxy server

If you are going to use node and want to install packages, but are behind an authenticated proxy server, you will likely get errors like ‘ETIMEDOUT’ when you make the call. to get around this, you need to tell node how to authenticate. This is easy with the following command from the dos prompt (running as administrator).

npm config set proxy http://domain\username:password@proxyserver:port


for example:

npm config set proxy http://northwind\bloggsj:secretpassword@proxy.northwind.com:8080

No comments:

Post a Comment