安装element-plus报错:Conflicting peer dependency: [email protected]

VSCode安装element-plus报错:

powershell 复制代码
D:\My Programs\app_demo>npm i element-plus
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @vue/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   dev eslint-plugin-vue@"^8.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/eslint-config-standard
npm ERR!   dev @vue/eslint-config-standard@"^6.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   peer eslint-plugin-vue@"^7.0.0" from @vue/[email protected]
npm ERR!   node_modules/@vue/eslint-config-standard
npm ERR!     dev @vue/eslint-config-standard@"^6.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! See C:\Users\PC\AppData\Local\npm-cache\eresolve-report.txt for a full report.

原因:尚未清楚,考虑是eslint检查和eslint规范冲突

解决方法:

在命令行末尾添加

powershell 复制代码
--legacy-peer-deps
相关推荐
啊~哈几秒前
vue3+elementplus表格表头加图标及文字提示
前端·javascript·vue.js
xiaogg36787 分钟前
vue+elementui 网站首页顶部菜单上下布局
javascript·vue.js·elementui
weixin_5275504016 分钟前
初级程序员入门指南
javascript·python·算法
小小小小宇26 分钟前
前端小tips
前端
HelloWord~32 分钟前
SpringSecurity+vue通用权限系统
vue.js·spring boot
小小小小宇35 分钟前
二维数组按顺时针螺旋顺序
前端
钡铼技术ARM工业边缘计算机36 分钟前
千元级PLC平台支持梯形图+Python双开发
javascript
安木夕1 小时前
C#-Visual Studio宇宙第一IDE使用实践
前端·c#·.net
努力敲代码呀~1 小时前
前端高频面试题2:浏览器/计算机网络
前端·计算机网络·html
高山我梦口香糖1 小时前
[electron]预脚本不显示内联script
前端·javascript·electron