Read about a proxy variable in a .npmrc file but it does not work. Trying to avoid manually downloading all require packages and installing.
.npmrc
To setup the http proxy have the -g flag set:
sudo npm config set proxy http://proxy_host:port -g
For https proxy, again make sure the -g flag is set:
sudo npm config set https-proxy http://proxy_host:port -g