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
相关推荐
lichenyang4538 小时前
Docker 学习笔记(一):为什么需要镜像、容器和仓库?
前端
kyriewen8 小时前
别再对着 TypeScript 报错发呆了:我把 10 个最常见的红色波浪线翻译成了人话
前端·javascript·typescript
IT_陈寒8 小时前
SpringBoot自动配置的坑,我的API突然就404了
前端·人工智能·后端
奇奇怪怪的9 小时前
Embedding 模型 10+ 横向评测
前端
陈广亮9 小时前
Monorepo 从 0 到 1 实操指南 2026 版:pnpm catalogs + Turborepo 2.x + changesets 全链路
前端
子兮曰9 小时前
OpenMontage 深度解剖:你的 AI 编程助手,其实是个视频工作室
前端·后端·ai编程
敲代码的鱼9 小时前
PDF 预览与签名批注写回 支持安卓 iOS 鸿蒙 UTS插件
android·前端·ios
子兮曰9 小时前
前端工具链的「Rust 化」:一场没有赢家的军备竞赛?
前端·后端·rust
Hyyy10 小时前
Function Calling / Tool Use的原理和实现模式
前端·llm·ai编程