不能安装grunt-cli,但可以安装凉亭

我有一个没有身份validation代理后面的Linux框。

我已经configurationgit使用https而不是git。

url.https://.insteadof=git:// 

我已经设置了我的http_proxy和https_proxy环境variables以及npm代理。

 ; cli configs user-agent = "npm/3.8.6 node/v6.0.0 linux x64" ; userconfig /jenkins/.npmrc https-proxy = "{host}:8060" proxy = "{host}:8060" 

我可以安装凉亭:

 npm install -g bower 

但是当我尝试

 npm install -g grunt-cli 

我得到:

 npm ERR! fetch failed https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz npm WARN retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0) .... npm ERR! network tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0) 

我已经尝试使用npm版本3.8.6 / 2.15.1

任何想法,为什么我可以在同一个会话中安装bower而不是grunt-cli(我甚至可以安装grunt,克隆grunt-cli)?

更新

1:我能做到

 curl -O https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz 

在成功的情况下,npm https-proxy等于$ https_proxy的值。

问题是我的npm代理是主机:端口,没有“http://”前缀。 像环境variables一样。 现在工作。

我不知道为什么凉亭安装。

你能试一下吗

 npm install -g grunt-cli 

这看起来像您的代理configurationnetworking问题。

更新到最新版本的节点和npm,并使用正确的代理设置。