Skip to content

Instantly share code, notes, and snippets.

@gnowland
Created March 15, 2021 06:57
Show Gist options
  • Save gnowland/6e6b8b4e0a3f564644ea00741b6aa89c to your computer and use it in GitHub Desktop.
Save gnowland/6e6b8b4e0a3f564644ea00741b6aa89c to your computer and use it in GitHub Desktop.
Configure and Clean NPM proxy
Purging any npm particles in the system:
npm config rm proxy
npm config rm proxy --global
npm config rm https-proxy
npm config rm https-proxy --global
npm config rm registry
npm cache clean
sudo apt-get remove nodejs nodejs-dev node-gyp libssl1.0-dev npm
Installing npm and configuring proxy
sudo apt-get install nodejs nodejs-dev node-gyp libssl1.0-dev npm
npm config set https-proxy http://${uname}:${pword}@${prox}:${port}--global
npm config set https-proxy http://${uname}:${pword}@${prox}:${port}
npm config set proxy http://${uname}:${pword}@${prox}:${port}--global
npm config set proxy http://${uname}:${pword}@${prox}:${port}
npm config set registry http://registry.npmjs.org
npm config set strict-ssl false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment