vue-echarts
vue-echarts copied to clipboard
Can not upgrade project to Vue 3.2.1
- [X] 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/[email protected]
│ └─┬ @vue/[email protected]
│ └── [email protected] deduped
├─┬ @vue/[email protected]
│ └── [email protected] deduped
├── [email protected]
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├── [email protected]
└─┬ [email protected]
└── [email protected] 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
Same here.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! vue-echarts@"^6.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @vue/[email protected]
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@"^1.0.5" from [email protected]
npm ERR! node_modules/vue-echarts
npm ERR! vue-echarts@"^6.0.0" from the root project
Can you privide the complete log output for the error?
Just install the Vue Composition Lib with the following command:
yarn add @vue/composition-api
Does the issue still exist?
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.
It is marked as an optional peer deps, are you still using npm@6
which may not recognize the peerDependenciesMeta
field?
No I'm on latest npm. Works with yarn though.
Yea, still causing issues with npm v8.3.1, works with yarn though.
Any update on this issue? Nuxt 3 is currently on RC and will be cementing the need for working Vue3 support. See: https://v3.nuxtjs.org/bridge/bridge-composition-api
I still cannot reproduce this with npm@8:
➜ ve-test ls
index.html package.json
➜ ve-test npm ls
[email protected] /Users/justineo/dev/ve-test
└── (empty)
➜ ve-test npm -v
8.7.0
➜ ve-test npm i -D vue echarts vue-echarts
added 27 packages, and audited 28 packages in 5s
2 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
➜ ve-test npm ls
[email protected] /Users/justineo/dev/ve-test
├── [email protected]
├── [email protected]
└── [email protected]
➜ ve-test
This is still an ongoing problem
Is this still a problem? Can you provide a repo that can reproduce this issue?
npm install echarts - works fine if I try to install vue-echarts npm install vue-echarts I get this error-stack:
CONSOLE
npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: undefined@undefined npm ERR! Found: [email protected] npm ERR! node_modules/vue npm ERR! peer vue@"^3.2.47" from @nuxt/[email protected] npm ERR! node_modules/@nuxt/vite-builder npm ERR! @nuxt/vite-builder@"3.2.0" from [email protected] npm ERR! node_modules/nuxt npm ERR! dev nuxt@"^3.1.2" from the root project npm ERR! peer vue@">=2.7 || >=3" from @unhead/[email protected] npm ERR! node_modules/@unhead/vue npm ERR! @unhead/vue@"^1.0.21" from @vueuse/[email protected] npm ERR! node_modules/@vueuse/head npm ERR! @vueuse/head@"^1.0.25" from [email protected] npm ERR! node_modules/nuxt npm ERR! dev nuxt@"^3.1.2" from the root project npm ERR! 8 more (@vitejs/plugin-vue, @vitejs/plugin-vue-jsx, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! vue-echarts@"" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! node_modules/vue npm ERR! peer vue@">= 2.5 < 2.7" from @vue/[email protected] npm ERR! node_modules/@vue/composition-api npm ERR! peerOptional @vue/composition-api@"^1.0.5" from [email protected] npm ERR! node_modules/vue-echarts npm ERR! vue-echarts@"" 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.
LOG-FILE:
npm resolution error report
While resolving: undefined@undefined Found: [email protected] node_modules/vue peer vue@"^3.2.47" from @nuxt/[email protected] node_modules/@nuxt/vite-builder @nuxt/vite-builder@"3.2.0" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@">=2.7 || >=3" from @unhead/[email protected] node_modules/@unhead/vue @unhead/vue@"^1.0.21" from @vueuse/[email protected] node_modules/@vueuse/head @vueuse/head@"^1.0.25" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"^3.2.25" from @vitejs/[email protected] node_modules/@vitejs/plugin-vue @vitejs/plugin-vue@"^4.0.0" from @nuxt/[email protected] node_modules/@nuxt/vite-builder @nuxt/vite-builder@"3.2.0" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"^3.0.0" from @vitejs/[email protected] node_modules/@vitejs/plugin-vue-jsx @vitejs/plugin-vue-jsx@"^3.0.0" from @nuxt/[email protected] node_modules/@nuxt/vite-builder @nuxt/vite-builder@"3.2.0" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"3.2.47" from @vue/[email protected] node_modules/@vue/server-renderer @vue/server-renderer@"3.2.47" from [email protected] peer vue@"^3.0.0" from @vuetify/[email protected] node_modules/@vuetify/loader-shared @vuetify/loader-shared@"^1.7.1" from [email protected] node_modules/vite-plugin-vuetify peerOptional vite-plugin-vuetify@"^1.0.0-alpha.12" from [email protected] node_modules/vuetify peer vuetify@"^3.0.0-beta.4" from @vuetify/[email protected] peer vuetify@"^3.0.0-beta.4" from [email protected] dev vuetify@"^3.1.4" from the root project dev vite-plugin-vuetify@"^1.0.2" from the root project peer vue@">=2.7 || >=3" from @vueuse/[email protected] node_modules/@vueuse/head @vueuse/head@"^1.0.25" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project vue@"^3.2.47" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"^3.2.0" from [email protected] node_modules/vue-router vue-router@"^4.1.6" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"^3.2.0" from [email protected] node_modules/vuetify peer vuetify@"^3.0.0-beta.4" from @vuetify/[email protected] peer vuetify@"^3.0.0-beta.4" from [email protected] dev vuetify@"^3.1.4" from the root project
Could not resolve dependency: vue-echarts@"*" from the root project
Conflicting peer dependency: [email protected] node_modules/vue peer vue@">= 2.5 < 2.7" from @vue/[email protected] node_modules/@vue/composition-api peerOptional @vue/composition-api@"^1.0.5" from [email protected] node_modules/vue-echarts vue-echarts@"*" from the root project
Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
This ist a minimal project solution. Techstack: Nuxt3 + Vuetify3
I had the same problem. Updating from npm 7.24.2 to npm 9.5.1 solved this issue for me. My stack is also Nuxt3 and Vuetify3.
npm install echarts - works fine if I try to install vue-echarts npm install vue-echarts I get this error-stack:
CONSOLE
npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: undefined@undefined npm ERR! Found: [email protected] npm ERR! node_modules/vue npm ERR! peer vue@"^3.2.47" from @nuxt/[email protected] npm ERR! node_modules/@nuxt/vite-builder npm ERR! @nuxt/vite-builder@"3.2.0" from [email protected] npm ERR! node_modules/nuxt npm ERR! dev nuxt@"^3.1.2" from the root project npm ERR! peer vue@">=2.7 || >=3" from @unhead/[email protected] npm ERR! node_modules/@unhead/vue npm ERR! @unhead/vue@"^1.0.21" from @vueuse/[email protected] npm ERR! node_modules/@vueuse/head npm ERR! @vueuse/head@"^1.0.25" from [email protected] npm ERR! node_modules/nuxt npm ERR! dev nuxt@"^3.1.2" from the root project npm ERR! 8 more (@vitejs/plugin-vue, @vitejs/plugin-vue-jsx, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! vue-echarts@"" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! node_modules/vue npm ERR! peer vue@">= 2.5 < 2.7" from @vue/[email protected] npm ERR! node_modules/@vue/composition-api npm ERR! peerOptional @vue/composition-api@"^1.0.5" from [email protected] npm ERR! node_modules/vue-echarts npm ERR! vue-echarts@"" 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.
LOG-FILE:
npm resolution error report
While resolving: undefined@undefined Found: [email protected] node_modules/vue peer vue@"^3.2.47" from @nuxt/[email protected] node_modules/@nuxt/vite-builder @nuxt/vite-builder@"3.2.0" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@">=2.7 || >=3" from @unhead/[email protected] node_modules/@unhead/vue @unhead/vue@"^1.0.21" from @vueuse/[email protected] node_modules/@vueuse/head @vueuse/head@"^1.0.25" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"^3.2.25" from @vitejs/[email protected] node_modules/@vitejs/plugin-vue @vitejs/plugin-vue@"^4.0.0" from @nuxt/[email protected] node_modules/@nuxt/vite-builder @nuxt/vite-builder@"3.2.0" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"^3.0.0" from @vitejs/[email protected] node_modules/@vitejs/plugin-vue-jsx @vitejs/plugin-vue-jsx@"^3.0.0" from @nuxt/[email protected] node_modules/@nuxt/vite-builder @nuxt/vite-builder@"3.2.0" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"3.2.47" from @vue/[email protected] node_modules/@vue/server-renderer @vue/server-renderer@"3.2.47" from [email protected] peer vue@"^3.0.0" from @vuetify/[email protected] node_modules/@vuetify/loader-shared @vuetify/loader-shared@"^1.7.1" from [email protected] node_modules/vite-plugin-vuetify peerOptional vite-plugin-vuetify@"^1.0.0-alpha.12" from [email protected] node_modules/vuetify peer vuetify@"^3.0.0-beta.4" from @vuetify/[email protected] peer vuetify@"^3.0.0-beta.4" from [email protected] dev vuetify@"^3.1.4" from the root project dev vite-plugin-vuetify@"^1.0.2" from the root project peer vue@">=2.7 || >=3" from @vueuse/[email protected] node_modules/@vueuse/head @vueuse/head@"^1.0.25" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project vue@"^3.2.47" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"^3.2.0" from [email protected] node_modules/vue-router vue-router@"^4.1.6" from [email protected] node_modules/nuxt dev nuxt@"^3.1.2" from the root project peer vue@"^3.2.0" from [email protected] node_modules/vuetify peer vuetify@"^3.0.0-beta.4" from @vuetify/[email protected] peer vuetify@"^3.0.0-beta.4" from [email protected] dev vuetify@"^3.1.4" from the root project
Could not resolve dependency: vue-echarts@"*" from the root project
Conflicting peer dependency: [email protected] node_modules/vue peer vue@">= 2.5 < 2.7" from @vue/[email protected] node_modules/@vue/composition-api peerOptional @vue/composition-api@"^1.0.5" from [email protected] node_modules/vue-echarts vue-echarts@"*" from the root project
Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
This ist a minimal project solution. Techstack: Nuxt3 + Vuetify3
Same issue. echarts install fine, but vue-echarts throw this error
node v: 16.5.0 npm v: 8.9.0 vue v: 3.2.25
When I add vue-echarts to my Nuxt3 project by npm install vue-echarts
, it failed and had same problem.
And then I use pnpm install vue-echarts
, it succeeded.
I hope this helpes.
My Environment: node version: 18.15.0 npm version: 9.6.3 Nuxt version: 3.5.2
The npm resolution error shows that the conflict is from @vue/compisiton-api
marking vue@">= 2.5 < 2.7"
as its peer dep. But in fact @vue/composition-api
itself is marked as an optional peer dep of vue-echarts
and 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-echarts
supports both Vue 2 and Vue 3 so that @vue/composition-api
cannot be completely removed from peer deps.
Does it work with npm if we enable the --legacy-peer-deps
flag (as the error log suggests)?
would be nice if this was fixed.
Does it work with npm if we enable the
--legacy-peer-deps
flag (as the error log suggests)?
I have the same problem with npm 10.2.3. Adding --legacy-peer-deps
resolves the problem but I would prefer if it was fixed upstream...
Maybe having a separate version for Vue 2 would be a solution?
I have the same problem with npm 10.2.3.
I still cannot reproduce with npm 10.2.3. Can you elaborate on how to reproduce this error in a fresh project?
Can you elaborate on how to reproduce this error in a fresh project?
Not really which surprises me. I get this error in existing project. I stripped down package.json as much as I could and you can find the result here: reproduction.zip
Running npm install vue-echarts
triggers the error.
But if I remove lock file and node_module, optionally change the version specifier for vue to 3.3.10
(so it is the same as in the removed lock file) and then install from scratch the error does not happen.
If I just change "vue": "^3.3.10"
to "vue": "3.3.10"
without removing anything the error also does not trigger.
I feel my knowledge of npm and peer dependencies is too low to debug it further. Maybe it's not a bug of vue-echarts but a bug of npm?