Set/UnSet npm behind the proxy server
If your server internet access is through a proxy server, you will need to modify the npm config. After that, your npm modules installation would work properly.
Set Proxy with NPMnpm config set proxy http://<username>:<password>@<proxy-url>:<port>
npm config set https-proxy http://<username>:<password>@<proxy-url>:<port>
Sometimes no need to include Username:Password for proxy URL.
Preview proxy setting in NPM Confignpm config list
Test the npm module installation from the internetnpm install @hapi/hapi i -g
Unset Proxy with NPM
npm config unset proxy http://<username>:<password>@<proxy-url>:<port>
npm config unset https-proxy http://<username>:<password>@<proxy-url>:<port>
That’s it. I hope this will help. 🙂
Photo: NPM icon icon by Icons8