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

移植到Electron中部分报错 #42

Open
pylee opened this issue Aug 12, 2020 · 4 comments
Open

移植到Electron中部分报错 #42

pylee opened this issue Aug 12, 2020 · 4 comments

Comments

@pylee
Copy link

pylee commented Aug 12, 2020

楼主好,
我将工作代码移植到electron工程中,然后控件整体可以加载出来:

image

不过中间流程图那部分就没渲染出来,报错信息如下

image

跟了下,大概问题出在`

image

这个newMatrix无法转换出来,git的demo是正常可用的,能请问下这个大概可能是啥原因么?

@guozhaolong
Copy link
Owner

应该是@antv/matrix-util这个包的版本问题,你指定为2.0.7试试

@pylee
Copy link
Author

pylee commented Aug 13, 2020

"@antv/dom-util": "^2.0.2",
"@antv/g-canvas": "^0.4.12",
"@antv/g6": "^3.5.2",
"@antv/matrix-util": "^2.0.7",
"@antv/util": "^2.0.9",

是用的2.0.7的

不过我尝试把@antv/g-base里面的
image
改为

import * as ext from '@antv/matrix-util';

就运行正常了,但原代码单独跑demo也是正常的,原代码的导出ext我实在没看懂是什么写法😂,请问这个是为什么呢?

@guozhaolong
Copy link
Owner

你的应该不是2.0.7吧,你把^2.0.7前面的^去掉,或者你看看你matrix-util的package.json中的version是不是2.0.7

@pylee
Copy link
Author

pylee commented Aug 13, 2020

image
是2.0.7的版本,不过仍然会报同样的错误,好奇怪了😳

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