Unable to remove npm proxy

In work I have a proxy server and install it in npm

 npm config set proxy http://theproxy:8080
 npm config set https-proxy https://theproxy:8080

Without work, I do not have a proxy server and I need to delete it in npm.

I 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

proxy server still exists

How to remove proxy server in npm

+4
source share
6 answers

This 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 the npm version

+1
source

Below everything worked for me, make sure the HTTP_PROXY environment variable is not deleted before deleting the configuration entries

Cancel HTTP_PROXY = very important

set HTTP_PROXY=
npm config rm proxy
npm config rm https-proxy
npm config rm http-proxy
+1
source

, - npmrc, ?, , -.

npmrc

: (/path/to/my/project/.npmrc) (~/.npmrc) ($ PREFIX/npmrc) npm (///npm/npmrc)

0
npm config rm proxy
npm config rm https-proxy
npm config rm http-proxy
0

, , . :

npm config rm proxy -g
npm config rm https-proxy -g
0

.

, proxy /url, npm config delete https-proxy.

, :

npm config set proxy
npm config delete https-proxy -g

, npm config list, , .

Now the very last thing, you need to run the following command:

npm config edit

A file will open in a text editor by default, in this file all the proxies you added are deleted.

0
source

All Articles