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?
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.The easiest way to remove any configuration at all from npm is to edit the npm config file. It only takes two(2) commands to do this; one to open npm config file for editing, the other to confirm your change.
npm config list
to view a list of all npm configurations that are active.npm config edit
to open a text editor with npm configurations. To remove the proxy line ( or simply comment it out ).npm config list
to confirm that the proxy configuration has been removed.C'est la vie!
I tried everything listed on this page, none worked, then I tried to the config edit. It worked instantly. (I use Windows 10)
I had the same problem once.
Follow these steps to delete proxy values:
1.To delete proxy in npm:
(-g is Important)
npm config delete proxy -g
npm config delete http-proxy -g
npm config delete https-proxy -g
Check the npm config file using:
npm config list
2.To delete system proxy:
set HTTP_PROXY=null
set HTTPS_PROXY=null
Now close the command line and open it to refresh the variables(proxy).
I was struggling with this for ages. What I finally did was go into the .npmrc file (which can be found in the user's directory followed by the user's name, ie. C:\Users\erikj/.npmrc), opened it with a text editor, manually removed any proxy settings and changed the http:// setting to https://. In this case, it is a matter of experimenting whether http or https will work for you. In my case, https worked. Go figure.
I have used the below commands for removing any proxy set:
And it solved my problem :)
this works for me fime
sample in my instance username:uname and password:pword