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
相关推荐
海绵宝宝的月光宝盒8 小时前
14-AutoCAD-阵列命令应用与案例实战(AR)
经验分享·笔记·自动化·课程设计·制造·学习方法·cad
niyongsheng9 小时前
3D 装箱算法工程化:数据结构、放置启发式与支撑规则
数据结构·算法·rust
Hello.Reader10 小时前
tsrs 技术解析用 Rust 移植 TypeScript 7,类型检查还能怎样提速?
开发语言·rust·typescript
王仔小奶12 小时前
Rust 正在接管金融圈?深度拆解一份高薪 FinTech 岗位 JD
开发语言·金融·rust
你为她披上外套时我正站在窗外13 小时前
subtitler v2.10 发布:3 个社区 PR、一个一天修掉的 issue,和关于 uuencode 的真相
rust
Thneonl13 小时前
熔断不是开关是状态机:Claude Code 路由内核的 3 条红线
人工智能·rust
Thneonl14 小时前
一个 Claude Code 本地代理,凭啥配了 3 个观测出口?
人工智能·rust
雨季mo浅忆15 小时前
记录Node.js安全漏洞及其内置Brotli解码器问题
node.js·安全性测试
tommyjiatong15 小时前
资安底座连环雷:从 PHP2Shell 到 Node2Shell
node.js·php
西风测评16 小时前
终端粘贴原理:bracketed paste、4095 字节行限制与 UTF-8 分片
rust