Node.js NPM : Package installation error due to proxy config

Standard

If you are facing below mentioned error while installing packages using NPM

“network tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy.company.com proxy.company.com:8080”

2015-11-05_15-38-15

Solution

Step1: Type: npm config delete proxy

Step1: Type: npm config get proxy (response should be ‘null’)

Try installing now, if it works fine. Everything good.

Otherwise manually edit config file.

Step3: Type: npm config edit

Notepad will open up, comment below lines by attaching ‘;’ before statements and save it

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

2015-11-05_15-44-42

Now try to install packages and it will work fine.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s