How can I clear the previous ssl proxy setting of NPM?
well, I search a lot, but all post I got is mainly about how to set
proxy in corporate network.
this works for me fime
proxy=http://<username>:<pass>@proxyhost:<port>
https-proxy=http://<uname>:<pass>@proxyhost:<port>
sample in my instance username:uname and password:pword
npm config set proxy=http://uname:pword@192.168.5.8:8080
npm config set https-proxy=http://uname:pword@192.168.5.8:8080
there is a simple way of deleting or removing the npm proxies.
npm config delete proxy
npm config delete https-proxy
npm config delete proxy -g
worked for me.
-g
was important as initially it was set with that option.
You can check configurations set with :
npm config list
Well, I'm gonna leave this here because I was having a big trouble with NPM.
I was trying to change a proxy setting using npm config set proxy "http://.../"
and then running npm config get proxy
. It was ALWAYS returning a wrong value, different from the one that I'd set.
I found out that I had a .npmrc
COMMITED on the project I was trying to run npm install
and that this file was overriding my own config.
So it was cleaning the proxy value, but I needed to also change the .npmrc
inside the folder's project.
After that, everything worked fine.
See the npm Settings in file C:\Users\myusers.npmrc
file. Sometime the npm proxy config settings does not apply. so its worth checking in there.
In my case, (windows OS), after put all those commands listed, npm kept taking the proxy in the setting of windows registry
\ HKEY_CURRENT_USER \ Environment
just remove the proxy settings there, after that, I restarted the pc and then "npm install" worked for me
Example