-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Error in Server Side Rendering. Need a valid ESM entry #5205
Comments
We will consider the server side rendering feature in version 5. |
🎉I just saw that ECharts would also support node environment in v5.5 apache/echarts#19513. It may also be a reference. Glad that the community has started to embrace the ESM-default package. |
We have already added SSR (Server Side Rendering) capabilities in the new version of G2, so theoretically, it shouldn't be very difficult to do the same in G6. Please look forward to it. |
Awesome, I will consider replacing ECharts with G2 in projects depending on G6 since they share many dependencies.
The entry should be |
你好,加上了吗,现在G6的5.0.18版本,在Nuxt3中,还是会有这报错。 |
hello,does the g6 support ssr function now?we want to use it in nodejs env。 |
This issue has been closed because it has been outdate for a long time. 这个 issue 已经被关闭,因为 它已经过期很久了。 |
Describe the bug
I tried to introduce G6 in my Nuxt.js project but failed unless transpiling G6.
G6 cannot be used in Server Side Rendering, because it does not have a valid ESM entry.
check here https://arethetypeswrong.github.io/?p=%40antv%2Fg6%404.8.23
check also https://publint.dev/@antv/[email protected]
Although G6 contains "
module
" inpackage.json
, Node.js doesn't recognize the"module"
field. Instead, we should use"exports"
to increase compatibility with it. For example:or with
"type": "module"
I highly recommend to fix it in
v5
before stable as it is a breaking changeRefs:
https://publint.dev/rules#has_module_but_no_exports
https://nuxt.com/docs/guide/concepts/esm#what-are-valid-imports-in-a-nodejs-context
Your Example Website or App
ignore
Steps to Reproduce the Bug or Issue
Load G6 in Node.js
Expected behavior
No error
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: