09月03, 2018

node-sass 安装失败的解决办法

install node

curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -

yum install gcc-c++ make

yum -y install nodejs

curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo

yum install yarn

install node-sass

NodeJS Minimum node-sass version Node Module
Node 13 4.13+ 79
Node 12 4.12+ 72
Node 11 4.10+ 67
Node 10 4.9+ 64
Node 8 4.5.3+ 57
  1. 根据版本号、系统环境,选择下载 .node 文件 https://github.com/sass/node-sass/releases
    # centos7
    https://github.com/sass/node-sass/releases/download/v4.8.3/linux-x64-57_binding.node
    

https://github.com/sass/node-sass/releases/download/v4.9.3/linux-x64-64_binding.node

npm i node-sass --sass_binary_path=linux-x64-64_binding.node

本文链接:https://blog.jnliok.com/post/npm-install-node-sass.html

-- EOF --

Comments