安装npm install vuedraggable@next报错

npm install vuedraggable@next

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @vitejs/plugin-vue@3.1.0 npm ERR! Found: vite@5.4.20 npm ERR! node_modules/vite npm ERR! peer vite@">=2.0.0" from vite-plugin-compression@0.5.1 npm ERR! node_modules/vite-plugin-compression npm ERR! dev vite-plugin-compression@"^0.5.1" from the root project npm ERR! peer vite@">=2.0.0" from vite-plugin-svg-icons@2.0.1 npm ERR! node_modules/vite-plugin-svg-icons npm ERR! dev vite-plugin-svg-icons@"2.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer vite@"^3.0.0" from @vitejs/plugin-vue@3.1.0 npm ERR! node_modules/@vitejs/plugin-vue npm ERR! dev @vitejs/plugin-vue@"3.1.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: vite@3.2.11 npm ERR! node_modules/vite npm ERR! peer vite@"^3.0.0" from @vitejs/plugin-vue@3.1.0 npm ERR! node_modules/@vitejs/plugin-vue npm ERR! dev @vitejs/plugin-vue@"3.1.0" 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:\Program Files\nodejs\node_cache\_logs\2025-09-26T06_57_23_827Z-eresolve-report.txt npm ERR! A complete log of this run can be found in: D:\Program Files\nodejs\node_cache\_logs\2025-09-26T06_57_23_827Z-debug-0.log

问题:依赖冲突

解决办法:

复制代码
npm install vite@^5.0.0 @vitejs/plugin-vue@^5.0.0
npm install vuedraggable@next
相关推荐
YAY_tyy2 小时前
Three.js 开发实战教程(四):相机系统全解析与多视角控制
前端·javascript·3d·教程·three.js
IT_陈寒2 小时前
Redis性能提升30%的秘密:5个被低估的高级命令实战解析
前端·人工智能·后端
liangshanbo12152 小时前
Node.js 文件删除:完整指南
node.js
EndingCoder3 小时前
中间件详解与自定义
服务器·javascript·中间件·node.js
excel3 小时前
全面解析 JavaScript 内置 Symbol 方法(含示例)
前端
excel3 小时前
一文搞懂 Vue 的双向绑定
前端
Q_Q19632884755 小时前
python+springboot+uniapp基于微信小程序的校园二手闲置二手交易公益系统 二手交易+公益捐赠
spring boot·python·django·flask·uni-app·node.js·php
Q_Q19632884757 小时前
python+spring boot洪涝灾害应急信息管理系统 灾情上报 预警发布 应急资源调度 灾情图表展示系统
开发语言·spring boot·python·django·flask·node.js·php
卡布叻_星星8 小时前
前端JavaScript笔记之父子组件数据传递,watch用法之对象形式监听器的核心handler函数
前端·javascript·笔记