-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a valid ESM entry #627
Comments
Let's keep this open. We'll work on this once ECharts and ZRender fix this on their side. |
I bumped issue in |
For anybody interested to fix it in their project with echarts 5.4.0 and vue-echarts 6.2.3:
|
Yes, I also walked this path, but it's becomming impossible when I convert my project into npm package. Now I'm trying to find a way to prevent installation of vue-echarts in project root node_modules, but in my package root instead |
Hi! If using with Vite, Node Vite dev server and Echarts v5.4.2 I get the following error using this code: import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { PieChart } from 'echarts/charts'
import { TitleComponent, TooltipComponent, LegendComponent } from 'echarts/components'
import VChart, { THEME_KEY } from 'vue-echarts'
use([CanvasRenderer, PieChart, TitleComponent, TooltipComponent, LegendComponent]) Error
|
Meet this issue again in Nuxt with SSR enabled. https://nuxt.com/docs/guide/concepts/esm#what-kinds-of-problems-can-there-be Need conditional-exports in a Node.js ESM context |
Both The dependency |
Just in time for me. |
@Justineo Any timeline on this? Would be really appreciated. Resorting to patching atm. |
Currently blocked by apache/echarts#19663 (we have TS issues at #766). We'll resolve this one after apache/echarts#19663 is resolved. |
Confirmation
How are you introducing Vue-ECharts into your project?
ES Module imports
Versions
Details
I'm using
vue-echarts
withvitest
.But vitest throw the following error:
According to the comment of vitest member vitest-dev/vitest#1452 (comment) , this is because
vue-charts
points to cjs entry that usesrequire
which is not intercepted byvitest
.See also his comment in another issue of vue-echarts here: #601 (comment)
Reproduction
stackblitz.com/edit/vitest-dev-vitest-fhmvl9
The text was updated successfully, but these errors were encountered: