解决node-sass安装失败
node-sass 安装时需要下载一个node-sass ...binding.node 文件,所以设置了淘宝源还是经常安装失败。还需要配置 sass_binary_site
最新方案
mirror-config-china 为中国内地的Node.js开发者准备的镜像配置,大大提高node模块安装速度。
特性
- 支持Windows和其他操作系统
- 自动配置各个node模块的安装源为淘宝镜像
npm install -g mirror-config-china --registry=https://registry.npmmirror.com
不推荐使用
registry.npmmirror.com/mirrors/nod… 无法正常获取到模块了
使用新地址registry.npmmirror.com/binary.html…
yarn config set registry https://registry.npmmirror.com
yarn config set sass_binary_site https://registry.npmmirror.com/binary.html?path=node-sass/
或者
npm set registry https://registry.npmmirror.com
npm set sass_binary_site https://registry.npmmirror.com/binary.html?path=node-sass/