npm install报错npm ERR! Found: vite@4.5.0

npm ERR! code ERESOLVE

npm ERR! ERESOLVE could not resolve

npm ERR!

npm ERR! While resolving: vite-plugin-ejs@1.7.0

npm ERR! Found: vite@4.5.0

npm ERR! node_modules/vite

npm ERR! dev vite@"4.5.0" from the root project

npm ERR! peerOptional vite@"^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0" from @unocss/astro@0.57.7

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: vite-plugin-ejs@1.7.0
npm ERR! Found: vite@4.5.0
npm ERR! node_modules/vite
npm ERR!   dev vite@"4.5.0" from the root project
npm ERR!   peerOptional vite@"^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0" from @unocss/astro@0.57.7
npm ERR!   node_modules/@unocss/astro
npm ERR!     @unocss/astro@"0.57.7" from unocss@0.57.7
npm ERR!     node_modules/unocss
npm ERR!       dev unocss@"^0.57.4" from the root project
npm ERR!   11 more (@unocss/vite, @vitejs/plugin-legacy, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@">=5.0.0" from vite-plugin-ejs@1.7.0
npm ERR! node_modules/vite-plugin-ejs
npm ERR!   dev vite-plugin-ejs@"^1.6.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vite@5.4.7
npm ERR! node_modules/vite
npm ERR!   peer vite@">=5.0.0" from vite-plugin-ejs@1.7.0
npm ERR!   node_modules/vite-plugin-ejs
npm ERR!     dev vite-plugin-ejs@"^1.6.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! D:\nodejs\node_cache\_logs\2024-09-22T05_44_56_692Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: D:\nodejs\node_cache\_logs\2024-09-22T05_44_56_692Z-debug-0.log

解决办法

npm install --legacy-peer-deps

相关推荐
YBN娜3 分钟前
Vue实现登录功能
前端·javascript·vue.js
阳光开朗大男孩 = ̄ω ̄=3 分钟前
CSS——选择器、PxCook软件、盒子模型
前端·javascript·css
minDuck8 分钟前
ruoyi-vue集成tianai-captcha验证码
java·前端·vue.js
小政爱学习!28 分钟前
封装axios、环境变量、api解耦、解决跨域、全局组件注入
开发语言·前端·javascript
魏大帅。33 分钟前
Axios 的 responseType 属性详解及 Blob 与 ArrayBuffer 解析
前端·javascript·ajax
花花鱼40 分钟前
vue3 基于element-plus进行的一个可拖动改变导航与内容区域大小的简单方法
前端·javascript·elementui
k093343 分钟前
sourceTree回滚版本到某次提交
开发语言·前端·javascript
EricWang13581 小时前
[OS] 项目三-2-proc.c: exit(int status)
服务器·c语言·前端
September_ning1 小时前
React.lazy() 懒加载
前端·react.js·前端框架
web行路人1 小时前
React中类组件和函数组件的理解和区别
前端·javascript·react.js·前端框架