Grunt安装失败

时间:2013-07-02 07:24:43

标签: node.js npm gruntjs

我正在尝试在机器上安装Grunt。我已经成功安装了Node.JS并配置了代理(使用npm config set proxy以及https-proxy)。我也在这里尝试了解决方案:Is there a way to make npm install (the command) to work behind proxy?

这是我得到的错误:

http GET https://registry.npmjs.org/grunt-cli
silly lockFile d63f3d0b-grunt-cli grunt-cli@
silly lockFile d63f3d0b-grunt-cli grunt-cli@
error Error: tunneling socket could not be established, cause=Parse Error
error     at ClientRequest.onError (C:\Program Files\nodejs\node_modules\npm\node_modules\request\node_modules\tunnel-agent\index.js:159:17)
error     at ClientRequest.g (events.js:175:14)
error     at ClientRequest.EventEmitter.emit (events.js:95:17)
error     at Socket.socketOnData (http.js:1558:9)
error     at TCP.onread (net.js:525:27)

我该怎么做才能解决这个问题?

1 个答案:

答案 0 :(得分:1)

对我有用的解决方案是将注册表从https设置为http:

$ npm config set http://registry.npmjs.org/
相关问题