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
Module not found: Error: Package path ./lib/interaction/utils is not exported #5466
Comments
Downgrade to @5.0.20 first, this problem will be fixed later |
This exports needs to be repaired https://github.com/antvis/G2/pull/5450/files |
It is already being fixed, and it is expected that the next version will be better |
问题背景来源:Nuxt 中不支持 G2 其问题出在: Nuxt SSR 模式打包的时候使用的 G2 CommonJS 模式,但 G2 依赖了 D3 的包,D3 的产物包只支持 ESM,故出现语法混用的情况 Nuxt 为什么会走 CommonJS ? Nuxt2 的策略,CJS file ('main') for the server build and use the ESM file ('module') for the client build,Nuxt3 server build 也开启支持 ESM,需要库设置 type: 'module' 或 文件为 .mjs,故使用 G2 还是走的 CommonJS 模式。 解决这个问题有两个思考:
目前 PR 这样改需要确认的是,类型文件独立引入的时候,需不需要考虑进去。 |
应该是支持 exports 的node版本 exports 权重高于 main、module,不支持的node版本依旧还是走 main 和 module |
是的,Node 12,对于打包工具而言,也做了一层保障 |
@loveshiun I’m wondering why you use |
I want to use For example in this page: g2 interaction doc, after selecting letter A, B and C, I want it to keep the 'selected' status after refreshing the page. A common scenario derived from the above example may be: when a user searching for names started with letter A, B and C, after selecting these letters, another div below this chart will display filtered user names. No matter it's importing user interacted data or load from a new url, like: https://www.google.com/search?q=test the string 'test' will be in the input box. So I tried something like:
to have the previously interacted statuses (in this example, names and ages). |
You can use |
@pearmini Thank you! 🤗 |
Error when upgrading from 5.0.20 to 5.0.22
my code contains
and after upgrading to 5.0.22, it shows
The text was updated successfully, but these errors were encountered: