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.
I try to set proxy to nothing:
npm config set http-proxy
npm config set https-proxy
the first command pass yet the second one warn that:
npm WARN invalid config proxy=""
npm WARN invalid config Must be a full url with 'http://'
is the warning neglectable and I have successfully clear the proxy setting?
then
also
npm had a bug on the proxy
None of the above helped me, but this did:
Source: http://jonathanblog2000.blogspot.ch/2013/11/set-and-reset-proxy-for-git-and-npm.html
In my case (Linux Mint 16 based on Ubuntu), I had to:
npm config delete https-proxy
, and alsoclear the
https_proxy
Bash environment parameter — oddly enough, although I cannot find this behavior documented anywhere, npm fallbacks tohttps_proxy
:Damn finally this does the trick in Debian Jessie with privoxy (ad remover) installed, Thank you :-)
If you go through the npm config documentation, it says:
As per this, to disable usage of proxy,
proxy
setting must be set tonull
. To set proxy value to null, one has to make sure thatHTTP_PROXY
orhttp_proxy
environment variable is not set. So unset these environment variables and make sure thatnpm config ls -l
showsproxy = null
.Also, it is important to note that:
It would have been better if npm had made the type of proxy setting to boolean to switch on/off the proxy usage. Or, they can introduce a new setting of sort
use_proxy
of type boolean.By the default value
npm
is looking for packages fromhttps://registry.npmjs.org
. What you also need to do is override theregistry
andstrict-ssl
values.