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

相关推荐
轻口味25 分钟前
【每日学点鸿蒙知识】AVCodec、SmartPerf工具、web组件加载、监听键盘的显示隐藏、Asset Store Kit
前端·华为·harmonyos
alikami28 分钟前
【若依】用 post 请求传 json 格式的数据下载文件
前端·javascript·json
吃杠碰小鸡1 小时前
lodash常用函数
前端·javascript
丰云1 小时前
一个简单封装的的nodejs缓存对象
缓存·node.js
emoji1111111 小时前
前端对页面数据进行缓存
开发语言·前端·javascript
泰伦闲鱼1 小时前
nestjs:GET REQUEST 缓存问题
服务器·前端·缓存·node.js·nestjs
m0_748250031 小时前
Web 第一次作业 初探html 使用VSCode工具开发
前端·html
一个处女座的程序猿O(∩_∩)O1 小时前
vue3 如何使用 mounted
前端·javascript·vue.js
m0_748235951 小时前
web复习(三)
前端
AiFlutter2 小时前
Flutter-底部分享弹窗(showModalBottomSheet)
java·前端·flutter