【jeecg-boot】vue 遇到依赖包兼容问题

npm warn using --force Recommended protections disabled.
PS E:\vscodespace\shxsboot-vue3> npm i
npm error code ERESOLVE
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: jeecgboot-vue3@3.7.0
npm error Found: vite@5.4.10
npm error
npm error While resolving: jeecgboot-vue3@3.7.0
npm error Found: vite@5.4.10
npm error While resolving: jeecgboot-vue3@3.7.0
npm error Found: vite@5.4.10
npm error Found: vite@5.4.10
npm error node_modules/vite
npm error node_modules/vite
npm error   dev vite@"^5.2.11" from the root project
npm error   dev vite@"^5.2.11" from the root project
npm error   peerOptional vite@"^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0" from unocss@0.58.9
npm error   node_modules/.store/unocss@0.58.9/node_modules/unocss
npm error     unocss@0.58.9
npm error     node_modules/unocss
npm error       dev unocss@"^0.58.5" from the root project
npm error   9 more (vite-plugin-compression, vite-plugin-mkcert, ...)
npm error
npm error Could not resolve dependency:
npm error peer vite@"^2.0.0" from vite-plugin-optimize-persist@0.1.2
npm error node_modules/vite-plugin-optimize-persist
npm error   dev vite-plugin-optimize-persist@"^0.1.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\wang\AppData\Local\npm-cache\_logs\2024-10-26T14_56_38_366Z-eresolve-report.txt

npm error A complete log of this run can be found in: C:\Users\wang\AppData\Local\npm-cache\_logs\2024-10-26T14_56_38_366Z-debug-0.log

如何解决呢,通过查询是版本冲突的问题

原因是我这个项目下载的vite版本太高了

需要先删除node_modoles ,然后重新下载依赖

删除后重新执行:pnpm install 

启动成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值