In work I have a proxy and set this in npm
npm config set proxy http://theproxy:8080
npm config set https-proxy https://theproxy:8080
Out of work I don't have the proxy and need to remove it in npm.
I've tried
npm config rm proxy
npm config rm https-proxy
and
npm config delete proxy
npm config delete https-proxy
but when I use
npm config get proxy
npm config get https-proxy
the proxy is still there
How do I remove the proxy in npm
In the System section, click on Open your computer's proxy settings. On Windows 10, this will open the Proxy settings window. Under Automatic proxy setup, switch off: Automatically detect settings & Use setup script. Under Manual proxy setup, switch off: Use a proxy server, then click on Save.
Open Settings > System > Open Proxy Settings > LAN Settings In LAN Settings you can find the proxy server and its port no.
The npmrc manages the npm config files. The config setting for npm is gotten from the command line, environment variables and the npmrc files. You can use the npm config command to update and edit the contents of the user and global npmrc files.
Below things worked for me, make sure environment variable HTTP_PROXY is unset before removing config entries
set HTTP_PROXY=
npm config rm proxy
npm config rm https-proxy
npm config rm http-proxy
It works very well for me ..
saidas-mbp:trunk saidababuchanda$ npm config set proxy https://www.google.com
saidas-mbp:trunk saidababuchanda$ npm config get proxy
https://www.google.com
saidas-mbp:trunk saidababuchanda$ npm config delete proxy
saidas-mbp:trunk saidababuchanda$
saidas-mbp:trunk saidababuchanda$ npm config get proxy
null
saidas-mbp:trunk saidababuchanda$ npm -v
1.4.14
saidas-mbp:trunk saidababuchanda$
Please look at your npm version
Try this
npm config delete proxy
npm config delete proxy -g
npm config delete https-proxy
npm config delete https-proxy -g
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With