前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >pm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! Whil

pm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! Whil

原创
作者头像
肥晨
发布2023-04-04 14:47:15
5290
发布2023-04-04 14:47:15
举报
文章被收录于专栏:node.js农民工前端node.js

报错内容

代码语言:shell
复制
 npm i element-ui -S
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: vue@3.2.47
npm ERR! node_modules/vue
npm ERR!   peer vue@"3.2.47" from @vue/server-renderer@3.2.47
npm ERR!   node_modules/@vue/server-renderer
npm ERR!     @vue/server-renderer@"3.2.47" from vue@3.2.47
npm ERR!   peer vue@"^3.2.0" from vue-router@4.1.6
npm ERR!   node_modules/vue-router
npm ERR!     vue-router@"^4.1.6" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! element-ui@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: vue@2.7.14
npm ERR! node_modules/vue
npm ERR!   peer vue@"^2.5.17" from element-ui@2.15.13
npm ERR!   node_modules/element-ui
npm ERR!     element-ui@"*" 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 /Users/naitang/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/naitang/.npm/_logs/2023-02-25T06_42_28_114Z-debug-0.log

vue安装element报错

或者安装其他报错

应该是版本问题

在安装命令后面加上

代码语言:shell
复制
-legacy-peer-deps

例如

代码语言:shell
复制
npm i element-ui -S -legacy-peer-deps

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档