If you are behind a proxy server and want to use npm to download packages, you will have to set your proxy settings for node package manager. Here’s how you can set the proxy:
npm config set proxy http://”user:password”@domain.com:port
npm config set https-proxy http://”user:password”@domain.com:port
Likewise, if you want to remove proxy settings, you can run the following commands:
npm config rm proxy
npm config rm https-proxy