踩坑记录-安装nuxt3报错:Error: Failed to download template from registry: fetch failed;

报错复现

  1. 安装nuxt3报错:Error: Failed to download template from registry: fetch failed
  2. npx nuxi init nuxt-demo 初始化nuxt 项目 报错 Error: Failed to download template from registry: fetch faile

踩坑记录-安装nuxt3报错:Error: Failed to download template from registry: fetch failed;_第1张图片
踩坑记录-安装nuxt3报错:Error: Failed to download template from registry: fetch failed;_第2张图片

解决方法

  1. 配置hosts

    1. Mac电脑:/etc/hosts
    2. win电脑:c:/Windows/System32/drivers/etc/hosts
  2. 拖动到vscode里面去,追加下面这行

   185.199.108.133 raw.githubusercontent.com
  1. 保存(以管理员身份覆盖)

还可以使用下面的 ip地址

踩坑记录-安装nuxt3报错:Error: Failed to download template from registry: fetch failed;_第3张图片

你可能感兴趣的:(日常记录,前端,node,nuxt,vue)