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

使用 @antv/g-plugin-yoga,出现:Uncaught ReferenceError: _a is not defined at nbind.js:1146:62 #1668

Open
cwwjsyc opened this issue Apr 23, 2024 · 4 comments
Assignees

Comments

@cwwjsyc
Copy link

cwwjsyc commented Apr 23, 2024

`import { Canvas, Group, Rect, Text } from '@antv/g';
import { Renderer } from '@antv/g-canvas';
import { Plugin } from '@antv/g-plugin-yoga';

const renderer = new Renderer();
renderer.registerPlugin(new Plugin());
`
出现 报错:

Uncaught ReferenceError: _a is not defined
at nbind.js:1146:62
at nbind.js:1590:3
at node_modules/yoga-layout-prebuilt/yoga-layout/dist/entry-browser.js (entry-browser.js:21:1)
at __require2 (chunk-3EJPJMEH.js?v=136e61d1:15:50)
at entry-browser.js:40:40

@xiaoiver xiaoiver self-assigned this May 29, 2024
@xiaoiver
Copy link
Contributor

方便的话可以提供更多信息,例如使用的构建工具,看起来像是 vite?

@gdnwr
Copy link

gdnwr commented Jun 3, 2024

@xiaoiver 6.0.6的官方示例(Yoga 排版引擎)也报错了。
https://g.antv.antgroup.com/zh/examples/plugins/yoga/#yoga-container

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at e.syncAttributes (umi.9da62fcc.js:1:1192269)
    at t.u (umi.9da62fcc.js:1:1189888)
    at e.notifyListeners (umi.9da62fcc.js:1:553778)
    at e.dispatchEvent (umi.9da62fcc.js:1:548440)
    at e.dispatchEvent (umi.9da62fcc.js:1:536258)
    at t.mountChildren (umi.9da62fcc.js:1:635832)
    at umi.9da62fcc.js:1:634731
    at e.init (umi.9da62fcc.js:1:555868)
    at t.initRenderingService (umi.9da62fcc.js:1:634388)
    at t.initRenderer (umi.9da62fcc.js:1:634141)
    at new t (umi.9da62fcc.js:1:629990)
    at <anonymous>:45:16
    at <anonymous>:17:5
    at <anonymous>:20:3
    at 2616.1e9f1e1a.async.js:1:52917
    at 2616.1e9f1e1a.async.js:1:52932
    at b (9399.ee29f7ce.async.js:1:730005)
    at k (9399.ee29f7ce.async.js:1:730286)
    at x (9399.ee29f7ce.async.js:1:730176)

@xiaoiver
Copy link
Contributor

xiaoiver commented Jun 4, 2024

在 vite 下报错:

vadimdemedes/yoga-layout-prebuilt#21

@gdnwr
Copy link

gdnwr commented Jun 13, 2024

@xiaoiver 您好,官方文档中说:“该插件使用 yoga-layout-prebuilt,包体积较大,后续我们会使用自己开发的轻量版布局引擎。”,不知道是否有开发计划?
https://g.antv.antgroup.com/plugins/yoga

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

3 participants