yarn切换element-plus版本

yarn的安装和卸载

npm install -g yarn
npm uninstall yarn -g  //yarn卸载

本机的element-plus版本

"element-plus": "2.0.1",

想要切换的element-plus版本

由于我需要用到树型选择,所以需要升级到2.1.8

用npm卸载element-plus时报如下错误

npm uninstall element-plus
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @vueup/vue-quill@1.1.0
npm ERR! Found: vue@3.2.26
npm ERR! node_modules/vue
npm ERR!   peer vue@"^3.2.0" from @element-plus/icons-vue@0.2.6
npm ERR!   node_modules/@element-plus/icons-vue
npm ERR!     @element-plus/icons-vue@"^0.2.6" from element-plus@2.0.1
npm ERR!     node_modules/element-plus
npm ERR!     @element-plus/icons-vue@"0.2.6" from the root project
npm ERR!   peer vue@"^3.0.0" from @vant/use@1.5.1
npm ERR!   node_modules/@vant/use
npm ERR!     @vant/use@"^1.5.1" from vant@4.3.1
npm ERR!     node_modules/vant
npm ERR!       vant@"^4.1.0" from the root project
npm ERR!   20 more (@vue/server-renderer, @wangeditor/editor-for-vue, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^3.2.41" from @vueup/vue-quill@1.1.0
npm ERR! node_modules/@vueup/vue-quill
npm ERR!   @vueup/vue-quill@"^1.0.0-alpha.40" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vue@3.2.47
npm ERR! node_modules/vue
npm ERR!   peer vue@"^3.2.41" from @vueup/vue-quill@1.1.0
npm ERR!   node_modules/@vueup/vue-quill
npm ERR!     @vueup/vue-quill@"^1.0.0-alpha.40" 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\35725\AppData\Local\npm-cache\_logs\2023-05-11T01_46_05_707Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\35725\AppData\Local\npm-cache\_logs\2023-05-11T01_46_05_707Z-debug-0.log

改用yarn卸载试试

先安装yarn

npm install -g yarn

安装完之后运行yarn -v还是报错,后来找到yarn的安装位置添加环境变量到path就可以了

 

 

 

复制yarn安装目录下的bin路径,然后添加到path的最后

 然后重新cmd运行yarn -v

 

 

 yarn切换element-plus

yarn uninstall element-plus

 原来yarn的安装和删除包和npm命令不一样

应该是yarn remove 包名

yarn remove element-plus

安装是add不是install

yarn add element-plus@2.1.8

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱的叹息

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值