NPM错误安装角度2 CLI:无法建立隧道套接字,statusCode = 405

时间:2017-01-09 22:39:35

标签: node.js angular

当我安装了角度2 cli时,NPM出现错误:

Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-48_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-48_binding.node":

tunneling socket could not be established, statusCode=405

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234

or configure npm proxy via
npm config set proxy http://example.com:8080

node -v:6.9.4,  npm -v:3.10.10

我没有使用代理。我做了几件事:

npm config rm proxy
npm config rm https-proxy
npm config set proxy false
npm cache clean
npm config set registry "https://registry.npmjs.org/"

但没有工作,我也搜索了stackoverflow几天,我没有得到解决方案,谢谢..

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,我做了以下配置更改。 在命令提示符下执行以下命令。

npm config set proxy null

npm config set https-proxy null

希望它对你有帮助。