node-sass安装和使用

Posted yeminglong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了node-sass安装和使用相关的知识,希望对你有一定的参考价值。

第一步,为了使用稳定和快捷,先设置淘宝镜像源。执行下面的命令行

npm config set registry https://registry.npm.taobao.org/

 

第二步,设置变量 sass_binary_site,指向淘宝镜像地址。执行下面的命令行

npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/

 

第三步,全局安装node-sass,执行下面的命令。

npm i -g node-sass

 还原

npm config set registry=http://registry.npmjs.org

 

以上是关于node-sass安装和使用的主要内容,如果未能解决你的问题,请参考以下文章

nexus raw 仓库代理(node-sass离线安装node-sass: Command failed)

nexus raw 仓库代理(node-sass离线安装node-sass: Command failed)

nexus raw 仓库代理(node-sass离线安装node-sass: Command failed)

这是不是可以安装 node-sass 离线代理

错误('`libsass` 未找到绑定。尝试使用运行 ionic 的 node-sass 重新安装 `node-sass`?')

无法为 Ionic 安装 node-sass