NodeJS and Npm Proxy Settings

Leave a Comment
If you are behind the proxy, then proxy will block your package installation. It may throw errors like this.
  1. Tunneling socket could not be established cause=getaddrinfo ENOTFOUND.
  2. In most cases you are behind a proxy or have bad network settings

NodeJS and Npm Proxy Settings Error
NodeJS and Npm Proxy Settings Error

Node package manager (NPM) uses the configuration file over the environment variable we set in windows system. So we need set proxy (http-proxy, https-proxy) in the Node configuration file using following commands. 

​npm config set proxy
npm config set http-proxy
npm config set https-proxy

If npm still have any issues then set registry using following command.

npm config set registry

If still you have any issues then close your command terminal and open it. Now try with npm install command


Post a Comment