美文网首页
node-sass安装

node-sass安装

作者: Mr老朝 | 来源:发表于2020-07-09 16:24 被阅读0次

node-sass安装老是提示连接超时,失败,怎么办

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.0/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.13.0/win32-x64-64_binding.node":

ESOCKETTIMEDOUT

1、下载node包

从上面的超时信息可以看到node包的url为https://github.com/sass/node-sass/releases/download/v4.13.0/win32-x64-64_binding.node,通过下载软件下载这个包。

2、启动本地服务,让node包可以本地访问

安装全局的轻量级的服务工具npm i -g live-server
cd到对应目录,启动服务live-server,保证可以通过url访问到本地node包

$ live-server
Serving "F:\" at http://127.0.0.1:8080
Ready for changes

live-server命令行常用配置表


image.png

3、npm install的时候加多个参数

  npm i ----sass-binary-site=http://127.0.0.1:8080/win32-x64-72_binding.node

4、其他笔记

nrm list

  npm -------- https://registry.npmjs.org/       
  yarn ------- https://registry.yarnpkg.com/     
  cnpm ------- http://r.cnpmjs.org/
* taobao ----- https://registry.npm.taobao.org/  
  nj --------- https://registry.nodejitsu.com/   
  npmMirror -- https://skimdb.npmjs.com/registry/
  edunpm ----- http://registry.enpmjs.org/   
  npm i ----sass-binary-site=http://127.0.0.1:8080/win32-x64-72_binding.node
  --npm_config_phantomjs_cdnurl=
  npm install nrm -g --registry=https://registry.npm.taobao.org/   

相关文章

网友评论

      本文标题:node-sass安装

      本文链接:https://www.haomeiwen.com/subject/ipdscktx.html