安装nuxt3报错:Error: Failed to download template from registry: fetch failed

问题复现:

输入命令安装nuxt3

pnpm dlx nuxi@latest init nuxt-app

然后出现下面错误

 ERROR  Error: Failed to download template from registry: fetch failed

 

解决方案:

配置hosts,Mac中路径是 /etc/hosts,在下面追加一行

185.199.108.133 raw.githubusercontent.com

下面是备用ip

185.199.108.133
185.199.109.133
185.199.110.133
185.199.111.133

2606:50c0:8000::154
2606:50c0:8001::154
2606:50c0:8002::154
2606:50c0:8003::154

PS: 本人一开始使用第一个地址,使用一段时间后发现报错,又不可用了,换了个地址继续可用

 

posted @ 2024-01-19 11:26  夜独醉  阅读(820)  评论(0)    收藏  举报