失败原因
网上的淘宝镜像源为 http://cdn.npm.taobao.org/dist/node-sass (这是旧的地址, 已失效)
应替换为: https://npm.taobao.org/mirrors/node-sass/ (2019-09)
使用淘宝源
yarn:
yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ -g
npm:
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
查看代理:
yarn config get registry
npm config get registry
一些常用的代理
registry=https://registry.npm.taobao.org
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
phantomjs_cdnurl=http://npm.taobao.org/mirrors/phantomjs
electron_mirror=http://npm.taobao.org/mirrors/electron/
// electron_mirror=https://cdn.npm.taobao.org/dist/electron/