vue-echarts: Can not upgrade project to Vue 3.2.1
- I can confirm this problem is not reproducible with ECharts itself.
How are you introducing Vue-ECharts into your project?
ES Module imports
Versions
├─┬ @vue/cli-plugin-babel@4.5.13
│ └─┬ @vue/babel-preset-app@4.5.13
│ └── vue@3.1.1 deduped
├─┬ @vue/compiler-sfc@3.1.1
│ └── vue@3.1.1 deduped
├── echarts@5.1.2
├─┬ element-plus@1.0.2-beta.48
│ └── vue@3.1.1 deduped
├─┬ vue-axios@3.2.4
│ └── vue@3.1.1 deduped
├─┬ vue-draggable-next@2.0.1
│ └── vue@3.1.1 deduped
├─┬ vue-echarts@6.0.0-rc.6
│ ├── echarts@5.1.2 deduped
│ ├─┬ vue-demi@0.9.1
│ │ └── vue@3.1.1 deduped
│ └── vue@3.1.1 deduped
├─┬ vue-i18n@9.1.6
│ └── vue@3.1.1 deduped
├─┬ vue-router@4.0.9
│ └── vue@3.1.1 deduped
├── vue@3.1.1
└─┬ vuex@4.0.2
└── vue@3.1.1 deduped
Details
I have a projet running all versions described about. Everything runs ok.
If I want to upgrade Vue to a newer version, I run npm update.
It seems a package @vue\composition-api block the update.
Can you assist
Reproduction
https://codesandbox.io/s/charming-night-2y6m6?file=/package.json
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 2
- Comments: 22 (8 by maintainers)
Commits related to this issue
- Remove composition api as peer dependency As provided in https://github.com/ecomfe/vue-echarts/issues/576#issuecomment-1020527205 — committed to MrCube42/vue-echarts by MrCube42 2 years ago
The npm resolution error shows that the conflict is from
@vue/compisiton-apimarkingvue@">= 2.5 < 2.7"as its peer dep. But in fact@vue/composition-apiitself is marked as an optional peer dep ofvue-echartsand not used by Vue 3 projects:https://github.com/ecomfe/vue-echarts/blob/53ebc2941ea39cddd4181efc30331ad06ed315e7/package.json#L76-L80
…but npm doesn’t seem to respect this. As
vue-echartssupports both Vue 2 and Vue 3 so that@vue/composition-apicannot be completely removed from peer deps.Does it work with npm if we enable the
--legacy-peer-depsflag (as the error log suggests)?Error still exists for me. I forked this repo and removed line https://github.com/ecomfe/vue-echarts/blob/main/package.json#L60. This removes the peer dependency “@vue/composition-api”, which is not required for Vue 3.
Same here.