node-sass 安装失败 Failed at the node-sass@4.9.2 postinstall script的解决

控制台运行npm install时报错,报错信息如下:


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



解决方法:

1、卸载node-sass

运行:npm uninstall node-sass


2、重新安装指定的node-sass版本(安装失败的版本)

运行:npm install node-sass@4.9.3


3、如果还是安装不成功的话,或者安装太慢连接不上,使用一下淘宝镜像后重复1,2步骤,成功后再npm install

使用淘宝镜像运行:npm config set registry https://registry.npm.taobao.org

posted @   JokerJason  阅读(19450)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
历史上的今天:
2016-10-15 web 安全 初探 (正在更新)
2016-10-15 Spring dbcp连接池简单配置 示例

It's not who you are underneath, it's what you do that defines you

Brick walls are there for a reason :they let us prove how badly we want things

点击右上角即可分享
微信分享提示