安装vue-awesome-swiper遇到的问题

之前安装过vue-awesome-swiper,今天突然出问题了,也不报错。

于是我就把node_modules文件删除了重新 npm install 了一遍发现还是不行。

然后我就将vue-awesome-swiper卸载了在装一次,这时候就开始报错安装失败了

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: vue2-standard-demo@0.1.0 
npm ERR! Found: vue@2.6.14
npm ERR! node_modules/vue
npm ERR!   vue@"^2.6.14" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"3.x" from vue-awesome-swiper@5.0.1
npm ERR! node_modules/vue-awesome-swiper
npm ERR!   vue-awesome-swiper@"*" 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 D:\app\nodejs\node_cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\app\nodejs\node_cache\_logs\2022-04-14T01_42_04_273Z-debug-0.log

一开始以为是版本不适合vue2

又装了一次npm install swiper vue-awesome-swiper@4.1.1 --save

这时候装的是4.1.1版本的。

结果又报错了

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vue2-standard-demo@0.1.0
npm ERR! Found: swiper@8.1.0
npm ERR! node_modules/swiper
npm ERR!   swiper@"^8.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer swiper@"^5.2.0" from vue-awesome-swiper@4.1.1
npm ERR! node_modules/vue-awesome-swiper
npm ERR!   vue-awesome-swiper@"4.1.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! See D:\app\nodejs\node_cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\app\nodejs\node_cache\_logs\2022-04-14T01_48_57_987Z-debug-0.log

然后我一看swiper是8.1.0的,然后又去github看了swiper vue-awesome-swiper4点几的版本,只能适配swiper5-6的版本,于是我就重新下载了swiper5.2.0的版本

之后单独安装 vue-awesome-swiper@4.1.1就行了

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值