nuxt3脚手架安装报错解决方法

当使用脚手架安装时

bash 复制代码
npx nuxi@latest init appname

错误1:ECONNRESET

bash 复制代码
npm error code ECONNRESET
npm error syscall read
npm error errno -4077
npm error network read ECONNRESET
npm error network This is a problem related to network connectivity.
npm error network In most cases you are behind a proxy or have bad network settings.

将网络dns改为114.114.114.114即可

错误2:Error: Failed to download template from registry: Failed to download https://raw.githubusercontent.com/nuxt/starter/templates/templates/v3.json: TypeError: fetch failed

修改HOSTS文件,添加以下内容

bash 复制代码
185.199.108.133 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.111.133 raw.githubusercontent.com
2606:50c0:8000::154 raw.githubusercontent.com
2606:50c0:8001::154 raw.githubusercontent.com
2606:50c0:8002::154 raw.githubusercontent.com
2606:50c0:8003::154 raw.githubusercontent.com
相关推荐
努力往上爬de蜗牛23 分钟前
react native真机调试
javascript·react native·react.js
李@十一₂⁰1 小时前
HTML 特殊字体符号
前端·html
y***86692 小时前
TypeScript在Electron应用中的使用
javascript·typescript·electron
小奶包他干奶奶3 小时前
Webpack学习——Loader(文件转换器)
前端·学习·webpack
zy happy4 小时前
若依 vue3 报错:找不到模块“@/api/xxxx/xxxxx”或其相应的类型声明。。Vue 3 can not find mod
前端·javascript·vue.js
潘小安4 小时前
Git Worktree + Claude Code:让你的开发效率翻倍的秘密武器
前端
meichaoWen4 小时前
【Vue3】vue3的全面学习(一)
前端·javascript·学习
小猪努力学前端5 小时前
在 React + React Router v7 SSR 项目里做多端适配,我踩的两个坑
前端·react.js
q***d1735 小时前
React桌面应用开发
前端·react.js·前端框架
8***29315 小时前
解决 Tomcat 跨域问题 - Tomcat 配置静态文件和 Java Web 服务(Spring MVC Springboot)同时允许跨域
java·前端·spring