date:
updated:
updated:
npm install
node-sass
参考整理 node-sass 安装失败的原因及解决办法(小结)
如果 package.json 里有 node-sass, npm install 时经常遇到报错:没有安装 python 或 node-sass 安装失败的问题,百度之后发现是被墙了
node-sass 安装失败的原因
npm 安装 node-sass 依赖时,会从 github 上下载 .node 文件。由于国内网络环境的问题,这个下载时间可能会很长,甚至导致超时失败。
解决方案就是使用其他源,或者使用工具下载,然后将安装源指定到本地。
解决方法一:使用淘宝镜像源(推荐)
设置变量 sass_binary_site,指向淘宝镜像地址。示例:
1 |
|
打赏
支付宝 | Alipay


微信 | WeChat

