node-sass安装出错问题解决

来源:互联网 发布:使命召唤 知乎 编辑:程序博客网 时间:2024/05/17 01:22

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

Cannot download https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-46_binding.nodeHint: If github.com is not accessible in your locationtry setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=http://example.com:1234or configure npm proxy vianpm config set proxy http://example.com:8080'

原因是node-sass被墙掉了,那我们用淘宝镜像cnpm安装:

# npm install -g cnpm --registry=https://registry.npm.taobao.org# cnpm install node-sass@4.5.3 --save
原创粉丝点击