npm i 报错 gifsicle pre-build test failed

1.ping raw.githubusercontent.com

powershell 复制代码
PS C:\Users\Administrator> ping raw.githubusercontent.com
Ping 請求找不到主機 raw.githubusercontent.com。請檢查該名稱,然後重試。

2.1 修改hosts檔案,增加以下設定

52.74.223.119 github.com

192.30.253.119 gist.github.com

54.169.195.247 api.github.com

185.199.111.153 assets-cdn.github.com

151.101.76.133 raw.githubusercontent.com

151.101.76.133 gist.githubusercontent.com

151.101.76.133 cloud.githubusercontent.com

151.101.76.133 camo.githubusercontent.com

151.101.76.133 avatars0.githubusercontent.com

151.101.76.133 avatars1.githubusercontent.com

151.101.76.133 avatars2.githubusercontent.com

151.101.76.133 avatars3.githubusercontent.com

151.101.76.133 avatars4.githubusercontent.com

151.101.76.133 avatars5.githubusercontent.com

151.101.76.133 avatars6.githubusercontent.com

151.101.76.133 avatars7.githubusercontent.com

151.101.76.133 avatars8.githubusercontent.com

2.2 失败换成这个

52.74.223.119 github.com

192.30.253.119 gist.github.com

54.169.195.247 api.github.com

185.199.111.153 assets-cdn.github.com

151.101.76.133 raw.githubusercontent.com

3.npm cache clean -f

4.ping raw.githubusercontent.com

powershell 复制代码
PS C:\Users\Administrator> ping raw.githubusercontent.com

正在 Ping raw.githubusercontent.com [151.101.76.133] 具有 32 位元組的數據:
來自 151.101.76.133 的回覆 回復: 位元組=32 時間=197ms TTL=51
來自 151.101.76.133 的回覆 回復: 位元組=32 時間=196ms TTL=51
來自 151.101.76.133 的回覆 回復: 位元組=32 時間=201ms TTL=51
相关推荐
hpoenixf3 小时前
2026 年前端面试问什么
前端·面试
还是大剑师兰特3 小时前
Vue3 中的 defineExpose 完全指南
前端·javascript·vue.js
泯泷3 小时前
阶段一:从 0 看懂 JSVMP 架构,先在脑子里搭出一台最小 JSVM
前端·javascript·架构
mengchanmian4 小时前
前端node常用配置
前端
华洛4 小时前
利好打工人,openclaw不是企业提效工具,而是个人助理
前端·javascript·产品经理
xkxnq4 小时前
第六阶段:Vue生态高级整合与优化(第93天)Element Plus进阶:自定义主题(变量覆盖)+ 全局配置与组件按需加载优化
前端·javascript·vue.js
A黄俊辉A5 小时前
vue css中 :global的使用
前端·javascript·vue.js
小码哥_常6 小时前
被EdgeToEdge适配折磨疯了,谁懂!
前端
小码哥_常6 小时前
从Groovy到KTS:Android Gradle脚本的华丽转身
前端
灵感__idea6 小时前
Hello 算法:复杂问题的应对策略
前端·javascript·算法