"@antv/s2": "^2.1.5"和"@antv/s2-react": "^2.1.4",无法正常使用 #3054
-
创建了一个全新的React Demo,安装了最新版的@antv/s2和@antv/s2-react。使用时报了如下错误: |
Beta Was this translation helpful? Give feedback.
Answered by
lijinke666
Dec 30, 2024
Replies: 2 comments
-
目前没有找到与您描述的问题直接相关的已知问题或讨论。您遇到的问题可能是由于某些特定的配置或使用方式导致的。 为了帮助您更好地解决问题,请您检查以下几点:
如果您仍然无法解决问题,建议您在 GitHub 上创建一个新的 issue,提供详细的错误信息和复现步骤,以便开发团队能够更好地帮助您。 🪧 TipsFor further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. |
Beta Was this translation helpful? Give feedback.
0 replies
-
确保你的打包工具识别 "exports": {
".": {
"import": "./esm/index.js",
"require": "./lib/index.js"
},
"./extends": {
"import": "./esm/extends/index.js",
"require": "./lib/extends/index.js"
},
"./*": "./*"
},
"peerDependencies": {
"@antv/g2": ">=5.1.21"
},
"peerDependenciesMeta": {
"@antv/g2": {
"optional": true
}
}, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gb853940223
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
确保你的打包工具识别
package.json
的exports
和peerDependenciesMeta
关键字,@antv/g2
是可选依赖, 只有使用@antv/s2/extends
才需要, 看起来是你的打包工具不支持, 实在不行可以额外安装下@antv/g2