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
相关推荐
jingling5553 分钟前
Flutter | 基础环境配置和创建flutter项目
前端·flutter
mapbar_front6 分钟前
如何判断一个领导值不值得追随
前端
西西学代码8 分钟前
Flutter---DragTarget(颜色拖拽选择器)
前端·javascript·flutter
小光学长8 分钟前
基于Vue的地铁综合服务管理系统7949eg04(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
前端·数据库·vue.js
nihao56116 分钟前
Figma-Context-MCP 帮助前端快速生成页面
前端·ai编程·figma
阿蓝灬41 分钟前
React中的stopPropagation和preventDefault
前端·javascript·react.js
天天向上102443 分钟前
vue3 抽取el-dialog子组件
前端·javascript·vue.js
lecepin1 小时前
AI Coding 资讯 2025-11-05
前端·javascript
excel1 小时前
Vue 模板解析器 parserOptions 深度解析
前端
前端小咸鱼一条1 小时前
17.React获取DOM的方式
前端·javascript·react.js