Skip to content
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

Issue with G6 v5 beta 35 #5717

Closed
romaderi12 opened this issue May 9, 2024 · 3 comments
Closed

Issue with G6 v5 beta 35 #5717

romaderi12 opened this issue May 9, 2024 · 3 comments

Comments

@romaderi12
Copy link

问题描述

These line of code seems having an issue

import { Graph, Extensions, extend } from '@antv/g6';
const ExtGraph = extend(Graph, {
transforms: { 'transform-v4-data': Extensions.TransformV4Data },
nodes: {
'sphere-node': Extensions.SphereNode,
},
behaviors: {
'orbit-canvas-3d': Extensions.OrbitCanvas3D,
'zoom-canvas-3d': Extensions.ZoomCanvas3D,
'hover-activate': Extensions.HoverActivate,
'brush-select': Extensions.BrushSelect,
},
});

Extensions and extend seems not exported in antv/g6.
It can be reproduce with your example as https://g6-next.antv.antgroup.com/en/examples/feature/features/#lodLevels

重现链接

https://codesandbox.io/s/452wyj

重现步骤

npm run build

预期行为

Compilation OK

平台

ubuntu
G6 V5
package.json

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@romaderi12
Copy link
Author

Ant-G6@0.1.0 build
craco build

Creating an optimized production build...
One of your dependencies, babel-preset-react-app, is importing the
"@babel/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. This is currently working because
"@babel/plugin-proposal-private-property-in-object" is already in your
node_modules folder for unrelated reasons, but it may break at any time.

babel-preset-react-app is part of the create-react-app project, which
is not maintianed anymore. It is thus unlikely that this bug will
ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
your devDependencies to work around this error. This will make this message
go away.

Failed to compile.

Attempted import error: 'extend' is not exported from '@antv/g6' (imported as 'extend').

@romaderi12 romaderi12 reopened this May 11, 2024
@romaderi12
Copy link
Author

issue stil open.

@hustcc
Copy link
Member

hustcc commented May 23, 2024

请看最新文档,issue中的用法 api 是被移出的。

@hustcc hustcc closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants