npm install --global windows-build-tools无法安装报错问题

在用npm安装windows-build-tools时,一直提示error。

bash 复制代码
npm install --global windows-build-tools

仔细看错误是详细:https://github.com/felixrieseberg/windows-build-tools/tree/master

网址https://npm.taobao.org/mirrors/python/无法访问,一直是用的以前老的淘宝镜像。

不管你怎么nrm切换还是无效,网址:https://npm.taobao.org/mirrors/python/2.7.15/python-2.7.15.amd64.msi 无法访问。

解决办法,安装时临时切换源:

bash 复制代码
npm --python_mirror=https://npmmirror.com/mirrors/python/ install --global windows-build-tools

试了:https://npmmirror.com/mirrors/python/2.7.15/python-2.7.15.amd64.msi 是可以正常访问下载的。