node-sass 安装报错解决办法

npm install安装node-sass时出现以下问题:

Cannot download https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-46_binding.node

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080'

  • 直接解决:npm install node-sass
  • 上面方法不行的话,原因是node-sass被墙掉了,那我们用淘宝镜像cnpm安装:

npm install -g cnpm --registry=https://registry.npm.taobao.org

cnpm install node-sass@4.5.3 --save

posted @ 2018-05-17 15:10  飞天龙猫  阅读(445)  评论(0编辑  收藏  举报