Node.js 无法安装grunt cli,但可以安装bower
我在一个无身份验证代理后面有一个linux盒子 我已经将git配置为使用https而不是gitNode.js 无法安装grunt cli,但可以安装bower,node.js,git,npm,gruntjs,Node.js,Git,Npm,Gruntjs,我在一个无身份验证代理后面有一个linux盒子 我已经将git配置为使用https而不是git url.https://.insteadof=git:// 我已经设置了我的http_代理和https_代理环境变量以及npm代理 ; cli configs user-agent = "npm/3.8.6 node/v6.0.0 linux x64" ; userconfig /jenkins/.npmrc https-proxy = "{host}:8060" proxy = "{host}:
url.https://.insteadof=git://
我已经设置了我的http_代理和https_代理环境变量以及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"
我可以使用以下设备安装bower:
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代理等于$https\u代理值。您能试试吗
npm install -g grunt-cli
这看起来像是代理配置的网络问题
更新到node和npm的最新版本,并使用正确的代理设置。您能试试吗
npm install -g grunt-cli
这看起来像是代理配置的网络问题
更新至node和npm的最新版本,并使用正确的代理设置。问题在于我的npm代理是host:port,没有http://前缀。就像环境变量一样。现在工作
我不知道为什么要安装bower。问题是我的npm代理是host:port,没有http://前缀。就像环境变量一样。现在工作
我不知道为什么要安装bower。嘿,不知怎么的,我复制和粘贴错了,谢谢你给我看。这个命令就是我要做的,我更新了我的问题。嘿,不知怎么的,我复制和粘贴错了,谢谢你给我看。这个命令就是我要做的,我更新了我的问题。我有同样的问题,它帮助了我,谢谢。我想你可以选择你自己的答案作为最佳答案:我有同样的问题,它帮助了我,谢谢。我想你可以选择自己的答案作为最佳答案: