npm install 报错,解决 node-sass@4.14.1 安装失败问题

淘宝原镜像源: https://registry.npm.taobao.org 旧域名于2021年官方公告域名更换事件,已于2022年05月31日零时起停止服务,域名HTTPS证书于2024年1月22日正式到期,不可再用。已替换为 https://registry.npmmirror.com


报错信息:

javascript 复制代码
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

解决方法:

  1. 切换node版本node-v14+
  2. 切换镜像地址,安装node-sass
bash 复制代码
npm config set sass_binary_site=https://npmmirror.com/mirrors/node-sass

npm i node-sass
相关推荐
Mr_li1 天前
NestJS 集成 TypeORM 的最优解
node.js·nestjs
UIUV1 天前
node:child_process spawn 模块学习笔记
javascript·后端·node.js
codingWhat1 天前
前端组件库开发实践:从零到发布
前端·npm·vite
前端付豪2 天前
Nest 项目小实践之注册登陆
前端·node.js·nestjs
天蓝色的鱼鱼2 天前
Node.js 中间层退潮:从“前端救星”到“成本噩梦”
前端·架构·node.js
codingWhat2 天前
uniapp 多地区、多平台、多环境打包方案
前端·架构·node.js
小p2 天前
nodejs学习: 服务器资源CPU、内存、硬盘
node.js
DongLi012 天前
rustlings 学习笔记 -- exercises/05_vecs
rust
Mr_li2 天前
手摸手,教你如何优雅的书写 NestJS 服务配置
node.js·nestjs
QQ5110082853 天前
python+springboot+django/flask的校园资料分享系统
spring boot·python·django·flask·node.js·php