安装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
相关推荐
LilySesy1 天前
ABAP+WHERE字段长度不一致报错解决
java·前端·javascript·bug·sap·abap·alv
Wang's Blog1 天前
前端FAQ: Vue 3 与 Vue 2 相⽐有哪些重要的改进?
前端·javascript·vue.js
再希1 天前
React+Tailwind CSS+Shadcn UI
前端·react.js·ui
用户47949283569151 天前
JavaScript 的 NaN !== NaN 之谜:从 CPU 指令到 IEEE 754 标准的完整解密
前端·javascript
群联云防护小杜1 天前
国产化环境下 Web 应用如何满足等保 2.0?从 Nginx 配置到 AI 防护实战
运维·前端·nginx
醉方休1 天前
Web3.js 全面解析
前端·javascript·electron
前端开发爱好者1 天前
前端新玩具:Vike 发布!
前端·javascript
今天也是爱大大的一天吖1 天前
vue2中的.native修饰符和$listeners组件属性
前端·javascript·vue.js
fxshy1 天前
在 Vue 3 + Vite 项目中使用 Less 实现自适应布局:VW 和 VH 的应用
前端·javascript·less
奇舞精选1 天前
AI时代的前端知识拾遗:前端事件循环机制详解(基于 WHATWG 最新规范)
前端·javascript