解决networking隧道套接字无法build立错误

在尝试安装节点检查器时,出现错误:

npm ERR! Linux 4.4.0-21-generic npm ERR! argv "/home/hira/.nvm/versions/node/v4.4.7/bin/node" "/home/hira/.nvm/versions/node/v4.4.7/bin/npm" "install" "-g" "node-inspector" npm ERR! node v4.4.7 npm ERR! npm v2.15.8 npm ERR! code ECONNRESET npm ERR! network tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:5002 npm ERR! network This is most likely not a problem with npm itself npm ERR! network and is related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! Please include the following file with any support request: 

我基本上有一个基于节点的精简模块的项目,它在127.0.0.1:5002上运行了http / https mitm代理

阅读关于这个问题的一些答案,我试图删除代理设置,使用:

 npm config rm proxy npm config rm https-proxy 

以及

 npm config set proxy = null 

所以当我做npm config ls -l时,它显示两个设置为空。 但是,它仍然拒绝安装。 我甚至试图删除我的系统networking代理设置。

有谁能帮助解决这个问题吗? 我正在运行Virtualbox上的Ubuntu 16.04上的节点v4.4.7和npm版本2.15.8 。 谢谢。

正如robertklep和QPTR在评论中指出的那样 ,删除环境variables为我解决了这个问题

HTTP_PROXY

https_proxy

HTTPS_PROXY

HTTP_PROXY