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
相关推荐
2601_958492557 小时前
Optimizing Engagement with Freehead Skate - HTML5 Game - Construct 3
前端·html·html5
茉莉玫瑰花茶7 小时前
工作流的常见模式 [ 1 ]
java·服务器·前端
zhangxingchao8 小时前
AI应用开发六:企业知识库
前端·人工智能·后端
山峰哥8 小时前
SQL慢查询调优实战:从全表扫描到索引覆盖的完整复盘
前端·数据库·sql·性能优化
红尘散仙9 小时前
一个 `#[uniffi::export]`,把 Rust 接进 React Native
前端·后端·rust
moshuying9 小时前
AI Coding 最大的 token 黑洞,可能根本不是 prompt
前端
红尘散仙9 小时前
一行 `#[specta::specta]`,让 Tauri IPC 有类型
前端·后端·rust
lichenyang4539 小时前
HarmonyOS HMRouter 接入记录:从普通 Tab Demo 到路由跳转
前端
木斯佳9 小时前
前端八股文面经大全:腾讯WXG暑期前端一面(2026-05-15)·面经深度解析
前端·面试·笔试