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
相关推荐
FreeBuf_1 小时前
恶意npm包利用隐藏提示和脚本规避AI安全工具检测
人工智能·安全·npm
努力小周1 小时前
基于STM32物联网智能老年人防摔系统
stm32·单片机·嵌入式硬件·物联网·c#·课程设计
Larry_zhang双栖1 小时前
解决 Figma MCP 下载图片卡死问题:从踩坑到自研 npm 工具全记录
前端·npm·figma
ByteCraze1 小时前
CDN 引入 与 npm 引入的区别
前端·npm·node.js
crary,记忆1 小时前
PNPM 和 NPM
前端·学习·npm·node.js
爱吃无爪鱼1 小时前
04-npm 与 Bun 快速入门实战指南
前端·vue.js·react.js·npm·sass
青云交1 小时前
深度实战:Rust交叉编译适配OpenHarmony PC——ansi_term完整适配案例
rust·交叉编译·命令行工具·openharmony pc·ansi_term·适配案例·终端颜色
星释1 小时前
Rust 练习册 106:太空年龄计算器与宏的魔法
开发语言·后端·rust
q_19132846951 小时前
基于Springboot+uniapp的智慧停车场收费小程序
java·vue.js·spring boot·小程序·uni-app·毕业设计·计算机毕业设计