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/xflow @1.1.52 -> @antv/layout @0.1.31 之前引入了 ml-matrix @6.10.8,现在在@antv/layout 版本不变的情况下,改为了引入ml-matrix @6.11.0,导致编译报错 #198

Open
veraicon opened this issue Dec 10, 2023 · 5 comments

Comments

@veraicon
Copy link

我的工程使用ice.js脚手架进行构建,显式引入了@antv/[email protected],它引入了@antv/[email protected]
之前npm start一直是正常的。从一周左右前开始
在引入了@antv/[email protected]版本号不变的前提下,它引入的ml-matrix版本号从6.10.8变化到6.11.0,导致出现以下报错:
ERROR Failed to compile with 2 errors 上午10:06:53

error in ./node_modules/_ml-matrix@6.11.0@ml-matrix/src/symmetricMatrix.js

Module parse failed: Unexpected character '#' (8:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| export class SymmetricMatrix extends AbstractMatrix {
| /** @type {Matrix} */

#matrix;
|
| get size() {

@ ./node_modules/ml-matrix@6.11.0@ml-matrix/src/index.js 2:0-34 2:0-34
@ ./node_modules/
@[email protected]@@antv/layout/es/layout/mds.js
@ ./node_modules/@[email protected]@@antv/layout/es/layout/index.js
@ ./node_modules/
@[email protected]@@antv/layout/es/index.js
@ ./node_modules/@[email protected]@@antv/xflow-core/es/command-contributions/graph/graph-layout.js
@ ./node_modules/
@[email protected]@@antv/xflow-core/es/command-contributions/graph/index.js
@ ./node_modules/@[email protected]@@antv/xflow-core/es/command-contributions/command-contribution.js
@ ./node_modules/
@[email protected]@@antv/xflow-core/es/command-contributions/module.js
@ ./node_modules/@[email protected]@@antv/xflow-core/es/command-contributions/components/index.js
@ ./node_modules/
@[email protected]@@antv/xflow-core/es/command-contributions/index.js
@ ./node_modules/@[email protected]@@antv/xflow-core/es/index.js
@ ./node_modules/
@[email protected]@@antv/xflow/es/core/index.js
@ ./node_modules/_@[email protected]@@antv/xflow/es/index.js

@veraicon
Copy link
Author

0.1.31是antv/layout的一个历史版本,为什么它的依赖会发生变化呢?另外请教下我应当如何解决该问题,尝试了通过webpack配置babel loader的办法,没有奏效。

@CoraLi1
Copy link

CoraLi1 commented Dec 16, 2023

0.1.31是antv/layout的一个历史版本,为什么它的依赖会发生变化呢?另外请教下我应当如何解决该问题,尝试了通过webpack配置babel loader的办法,没有奏效。

你装一下最新版本的antv就好了,两周前有维护者固定了ml-matrix的版本,之前是会update的

@wenmin92
Copy link

wenmin92 commented Dec 21, 2023

0.1.31是antv/layout的一个历史版本,为什么它的依赖会发生变化呢?另外请教下我应当如何解决该问题,尝试了通过webpack配置babel loader的办法,没有奏效。

你装一下最新版本的antv就好了,两周前有维护者固定了ml-matrix的版本,之前是会update的

我这边使用 antv 最新版会出现其他问题,这个问题没能解决,用了旧版,这时候该怎么解决这个问题呢?
补充:通过 overrides/resolutions 强制依赖的版本号即可解决

@WangYingYaTou
Copy link

same question

1 similar comment
@linqiqi077
Copy link

same question

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

5 participants