gifsicle@5.2.0 postinstall: `node lib/install.js` npm install 时候报错

在使用yarn 安装 vite-plugin-imagemin 模块,执行

 yarn add vite-plugin-imagemin -D

报错gifsicle@5.2.0 postinstall: `node lib/install.js` npm install 时候报错。

参考了

gifsicle@5.2.0 postinstall: `node lib/install.js` npm install 时候报错_钥零零的博客-优快云博客

在命令后加参数 --ignore-scripts,治标不治本。

尝试了,没效果,还尝试了加上 代理,也是无果、

https://www.youkuaiyun.com/tags/MtTaEg0sMDc3NTgxLWJsb2cO0O0O.html

最后使用程序员三大法宝之一: 重装

// 查看命令
yarn cache dir
// 清除缓存
yarn cache clean
// 重新安装
yarn install

奇迹般的安装成功了,没有问题了。

可能是yarn 本地缓存的gifsicle包有缺失,导致一直使用缓存的进行编译。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值