antvis / layout

Layout algorithms for graphs.
193 stars 55 forks source link

工程引用@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 9 months ago

veraicon commented 9 months ago

我的工程使用ice.js脚手架进行构建,显式引入了@antv/xflow@1.1.52,它引入了@antv/layout@0.1.31。 之前npm start一直是正常的。从一周左右前开始 在引入了@antv/layout@0.1.31版本号不变的前提下,它引入的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 @ ./nodemodules/@antv_layout@0.1.31@@antv/layout/es/layout/mds.js @ ./nodemodules/@antv_layout@0.1.31@@antv/layout/es/layout/index.js @ ./nodemodules/@antv_layout@0.1.31@@antv/layout/es/index.js @ ./nodemodules/@antv_xflow-core@1.1.52@@antv/xflow-core/es/command-contributions/graph/graph-layout.js @ ./nodemodules/@antv_xflow-core@1.1.52@@antv/xflow-core/es/command-contributions/graph/index.js @ ./nodemodules/@antv_xflow-core@1.1.52@@antv/xflow-core/es/command-contributions/command-contribution.js @ ./nodemodules/@antv_xflow-core@1.1.52@@antv/xflow-core/es/command-contributions/module.js @ ./nodemodules/@antv_xflow-core@1.1.52@@antv/xflow-core/es/command-contributions/components/index.js @ ./nodemodules/@antv_xflow-core@1.1.52@@antv/xflow-core/es/command-contributions/index.js @ ./nodemodules/@antv_xflow-core@1.1.52@@antv/xflow-core/es/index.js @ ./nodemodules/@antv_xflow@1.1.52@@antv/xflow/es/core/index.js @ ./nodemodules/@antv_xflow@1.1.52@@antv/xflow/es/index.js

veraicon commented 9 months ago

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

CoraLi1 commented 9 months ago

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

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

wenmin92 commented 8 months ago

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

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

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

WangYingYaTou commented 1 month ago

same question

linqiqi077 commented 2 weeks ago

same question