You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

更新@vue/cli-plugin-eslint与eslint时遇ERESOLVE依赖冲突问题

依赖更新冲突问题

当前项目依赖片段:

...
"eslint": "^6.7.2",
"@vue/cli-plugin-eslint": "~4.5.0"
...

我想把@vue/cli-plugin-eslint更新到5版本,该包要求peer依赖为eslint@>=7.5.0,所以执行了同时更新两者的命令:
npm install @vue/cli-plugin-eslint@5 eslint@7

但执行后收到如下错误:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: sci-annot@0.1.6
npm ERR! Found: @vue/cli-plugin-eslint@4.5.19
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR!   dev @vue/cli-plugin-eslint@"5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev @vue/cli-plugin-eslint@"5" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: eslint@7.32.0
npm ERR! node_modules/eslint
npm ERR!   peer eslint@">=7.5.0" from @vue/cli-plugin-eslint@5.0.8
npm ERR!   node_modules/@vue/cli-plugin-eslint
npm ERR!     dev @vue/cli-plugin-eslint@"5" 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.

这里的困惑点在于:eslint@7.32.0明明满足eslint@>=7.5.0的版本要求,但错误提示却显示两者存在冲突。

内容的提问来源于stack exchange,提问作者Dzeri96

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.19 06:20:12