依赖包和项目版本不一致的冲突解决_conflicting peer dependency vue@3

文章描述了npm在安装过程中遇到的警告和错误,涉及Vue、Vant和ECharts的版本冲突,提供了解决此类冲突以及查阅大厂前端面试题的指南。
摘要由CSDN通过智能技术生成

报错如下

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: vant@2.12.34
npm WARN Found: vue@2.5.21
npm WARN node_modules/vue
npm WARN   vue@"^2.5.21" from the root project
npm WARN   3 more (vue-cli-plugin-i18n, vue-echarts, vuex)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer vue@">= 2.6.0" from vant@2.12.34
npm WARN node_modules/vant
npm WARN   vant@"^2.2.16" from vue-scale@1.2.0
npm WARN   node_modules/vue-scale
npm WARN
npm WARN Conflicting peer dependency: vue@3.4.4
npm WARN node_modules/vue
npm WARN   peer vue@">= 2.6.0" from vant@2.12.34
npm WARN   node_modules/vant
npm WARN     vant@"^2.2.16" from vue-scale@1.2.0
npm WARN     node_modules/vue-scale
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: vue-echarts@5.0.0-beta.0
npm ERR! Found: echarts@5.2.1
npm ERR! node_modules/echarts
npm ERR!   echarts@"^5.2.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer echarts@"^4.1.0" from vue-echarts@5.0.0-beta.0
npm ERR! node_modules/vue-echarts
npm ERR!   vue-echarts@"^5.0.0-beta.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: echarts@4.9.0
npm ERR! node_modules/echarts
npm ERR!   peer echarts@"^4.1.0" from vue-echarts@5.0.0-beta.0
npm ERR!   node_modules/vue-echarts
npm ERR!     vue-echarts@"^5.0.0-beta.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\22560\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\22560\AppData\Local\npm-cache\_logs\2024-01-04T02_33_51_152Z-debug-0.log

此警告和错误消息表明您的项目中存在冲突的对等依赖项,特别是与 Vue、Vant 和 ECharts 的版本相关的依赖项。

这里分享一份由字节前端面试官整理的「2021大厂前端面试手册」,内容囊括Html、CSS、Javascript、Vue、HTTP、浏览器面试题、数据结构与算法。全部整理在下方文档中,共计111道

HTML

  • HTML5有哪些新特性?

  • Doctype作⽤? 严格模式与混杂模式如何区分?它们有何意义?

  • 如何实现浏览器内多个标签页之间的通信?

  • ⾏内元素有哪些?块级元素有哪些? 空(void)元素有那些?⾏内元 素和块级元素有什么区别?

  • 简述⼀下src与href的区别?

  • cookies,sessionStorage,localStorage 的区别?

  • HTML5 的离线储存的使用和原理?

  • 怎样处理 移动端 1px 被 渲染成 2px 问题?

  • iframe 的优缺点?

  • Canvas 和 SVG 图形的区别是什么?

JavaScript

开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

  • 问:0.1 + 0.2 === 0.3 嘛?为什么?

  • JS 数据类型

  • 写代码:实现函数能够深度克隆基本类型

  • 事件流

  • 事件是如何实现的?

  • new 一个函数发生了什么

  • 什么是作用域?

  • JS 隐式转换,显示转换

  • 了解 this 嘛,bind,call,apply 具体指什么

  • 手写 bind、apply、call

  • setTimeout(fn, 0)多久才执行,Event Loop

  • 手写题:Promise 原理

  • 说一下原型链和原型链的继承吧

  • 数组能够调用的函数有那些?

  • PWA使用过吗?serviceWorker的使用原理是啥?

  • ES6 之前使用 prototype 实现继承

  • 箭头函数和普通函数有啥区别?箭头函数能当构造函数吗?

  • 事件循环机制 (Event Loop)

  • 21
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: vue-router@4.2.1 npm ERR! Found: vue@2.7.14 npm ERR! node_modules/vue npm ERR! peerOptional vue@"*" from @vue/babel-preset-jsx@1.4.0 npm ERR! node_modules/@vue/babel-preset-jsx npm ERR! @vue/babel-preset-jsx@"^1.0.0" from @vue/babel-preset-app@3.12.1 npm ERR! node_modules/@vue/babel-preset-app npm ERR! @vue/babel-preset-app@"^3.12.1" from @vue/cli-plugin-babel@3.12.1 npm ERR! node_modules/@vue/cli-plugin-babel npm ERR! dev @vue/cli-plugin-babel@"^3.10.0" from the root project npm ERR! vue@"^2.7.14" from the root project npm ERR! 1 more (vuex) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer vue@"^3.2.0" from vue-router@4.2.1 npm ERR! node_modules/vue-router npm ERR! vue-router@"^4.2.1" from the root project npm ERR! npm ERR! Conflicting peer dependency: vue@3.3.4 npm ERR! node_modules/vue npm ERR! peer vue@"^3.2.0" from vue-router@4.2.1 npm ERR! node_modules/vue-router npm ERR! vue-router@"^4.2.1" 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! C:\Users\11833\AppData\Local\npm-cache\_logs\2023-05-29T06_00_03_754Z-eresolve-report.txt npm ERR! A complete log of this run can be found in: C:\Users\11833\AppData\Local\npm-cache\_logs\2023-05-29T06_00_03_754Z-debug-0.log
05-30
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值