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

Dependency issue with antd v5.0.0 #1689

Open
alenocera opened this issue Nov 18, 2022 · 42 comments
Open

Dependency issue with antd v5.0.0 #1689

alenocera opened this issue Nov 18, 2022 · 42 comments
Labels
flowchart 流程图X6

Comments

@alenocera
Copy link

alenocera commented Nov 18, 2022

Hello,
just found this issue while upgrading my project with the new v5.0.0 released today.

npm ERR! Found: antd@5.0.0 npm ERR! node_modules/antd npm ERR! antd@"^5.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer antd@"^4.6.3" from @ant-design/charts@1.4.2 npm ERR! node_modules/@ant-design/charts npm ERR! @ant-design/charts@"^1.4.2" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

As suggests by NPM, we can able to continue installation with
--legacy-peer-deps

but I guess a fix is necessary to able to do not have strange issue and strange behaviour at all.

Thanks, appreciate it.

@lxfu1
Copy link
Member

lxfu1 commented Nov 24, 2022

It will be supported in the near future. If the flowchart is not used, you can use sub packages to pass it first,like: @ant-design/plots @ant-design/graphs.

@b5414
Copy link

b5414 commented Dec 6, 2022

Same

~fixed:
npm install @ant-design/plots

@niranjanborawake
Copy link

Hello Team

@ant-design/charts v1.4.2 still has the issue in compilation.

Failed to compile.

./node_modules/@ant-design/charts/node_modules/@antv/x6-react-components/es/color-picker/index.js
Module not found: Can't resolve 'antd/es/popover/style/index.css' in '<repo>/node_modules/@ant-design/charts/node_modules/@antv/x6-react-components/es/color-picker'

@osabros
Copy link

osabros commented Dec 14, 2022

Same

So far I'm using it with antd5 and all works

The main breaking changes in antd5 is the changing of Moment library to Dayjs, could this impact the charts library?

@niranjanborawake
Copy link

The main breaking changes in antd5 is the changing of Moment library to Dayjs, could this impact the charts library?

Along with this, antd v5 has removed less and adopted CSS-in-JS.
charts package has a peer dependency on antd v4 and one of the component ColorPicker directly imports the popover index.css.

When switched to antd v5 there are no css files and hence it fails to compile.

@letrape
Copy link

letrape commented Dec 24, 2022

Hello Team

@ant-design/charts v1.4.2 still has the issue in compilation.

Failed to compile.

./node_modules/@ant-design/charts/node_modules/@antv/x6-react-components/es/color-picker/index.js
Module not found: Can't resolve 'antd/es/popover/style/index.css' in '<repo>/node_modules/@ant-design/charts/node_modules/@antv/x6-react-components/es/color-picker'

I have the same issue, any work around to use antd charts with antd 5, i dont want to downgrade to 4.6

@Orkuml
Copy link

Orkuml commented Jan 5, 2023

I'm waiting about solution too. =(

image

@alenocera
Copy link
Author

Guys, as you know the command --legacy-peer-deps is not the best solution and if you want to allow compile without using that one, you can use the "overrides" object into your package, like this:

"overrides": {
    "@ant-design/charts": {
      "antd": "^5.0.7"
    }
  },

Obviously also this solution is not the better one, but avoid you to use the legacy command. Meantime something moves forward to fix this, I'm able to compile a little bit better (and faster) instead using the legacy things.

Hope help you and waiting for final solution.

@RosaErick
Copy link

Waiting a solution since last year. 😭

image

@lxfu1 lxfu1 added the flowchart 流程图X6 label Feb 17, 2023
@d00rsfan
Copy link

d00rsfan commented Feb 27, 2023

Guys, as you know the command --legacy-peer-deps is not the best solution and if you want to allow compile > ```
"overrides": {
"@ant-design/charts": {
"antd": "^5.0.7"
}
},
I also needed to add to "overrides" this line:
"@ant-design/icons@": "^5.0.0"

@ildfreelancer
Copy link

For those who got this issue,

While waiting for new upgrade, you can do like this

put this in package.json, you might need to change version to match your current packages

  "overrides": {
    "@ant-design/charts": {
      "antd": "^5.3.1",
      "@ant-design/icons": "^5.0.0"
    }
  }

@vgs18
Copy link

vgs18 commented Mar 27, 2023

Hi, I am also facing the mentioned issue, any leads on when this will be fixed by ant charts team? The workaround might give a temporary fix, but what is the expected date of permanent resolution?
Thanks in advance.

@arifszn
Copy link

arifszn commented Mar 31, 2023

No update still :(

@hassssan051
Copy link

The library looks great, would love to see an update to v5 so that I can start using it.

@Orkuml
Copy link

Orkuml commented Apr 13, 2023

Almost 5 months passed away since my last try, antD is now in the version 5.4.2, nobody fixed this yet! Everyone needs to use antD Charts can't use antD 5.4.2, seriously?

@jdlms
Copy link

jdlms commented Apr 13, 2023

Like others here I also fixed this issue by removing the charts package and npm installing @ant-design/plots

@gujiwuqing
Copy link

嗨,我也面临着提到的问题,蚂蚁图表团队何时会解决这个问题的任何线索?解决方法可能会提供临时修复,但永久解决的预期日期是什么时候?提前谢谢。

着实有点离谱 我看这个issues已经大半年了 还没解决

@zhengmenghuang
Copy link

双手挠头

@lxfu1
Copy link
Member

lxfu1 commented May 30, 2023

It will be supported in the near future. If the flowchart is not used, you can use sub packages to pass it first,like: @ant-design/plots @ant-design/graphs.

没有使用到流程图的项目,不会存在antd版本问题,直接安装对应的子包即可,官网示例已经明确指出了对应子包,不需要安装主包@ant-design/charts

@gabuvi7
Copy link

gabuvi7 commented Jun 20, 2023

yes, but it doesn't the way to fix something. I wanna use the line graph and i need the '@ant-design/charts' package. 8 month with the same issue. We are in June and it doesn't seems to be fixed

@RosaErick
Copy link

August and no update still :(

@kamivisionvaibhav
Copy link

Hi Team, thank you for all the contribution and making this library free and open source but is there any plan/timeline on next update where this package will be compatible with v5?

@Ranzeb
Copy link

Ranzeb commented Aug 7, 2023

Please can you fix this issue? It's quite annoying

@RusseII
Copy link

RusseII commented Aug 14, 2023

I would love for this to be fixed thank you for all of your effort !

@ketangupta34
Copy link

PLEASE FIX THIS, its been a year 🙄

@AnandD17
Copy link

AnandD17 commented Nov 16, 2023

please fix this issue its been more than a year

@Tantatorn-dev
Copy link

Any update on this

@schidobvu
Copy link

Please fix this, More than a year Now!

@lxfu1
Copy link
Member

lxfu1 commented Nov 29, 2023

If only statistical charts are used, it can be upgraded to V2,We will gradually improve other types of charts(flowchart、graphs and so on)

@zhoujian-official
Copy link

zhoujian-official commented Dec 1, 2023

这个库还维护吗,这个antd的依赖版本问题一年多了都没修。库不维护的话可以标记一下deprecated,以免还有新项目误用这个无人维护的库

@hustcc
Copy link
Collaborator

hustcc commented Dec 1, 2023

这个库还维护吗,这个antd的依赖版本问题一年多了都没修。库不维护的话可以标记一下deprecated,以免还有新项目误用这个无人维护的库

这不是已经在升级吗?目前已经把 plot 部分升级了,发布了 2.0 版本,其他的 graph、map 的升级,也需要等待底层升级一起,会逐步发布 2.1、2.2 版本,因为跟随依赖,所以周期会比较长。

如果质疑进度和投入,可以进来一起了解下情况,再看时间是不是太长,是不是没有维护!也期望社区同学能一起进来弄,毕竟是业余之外做开源。

@zhoujian-official
Copy link

回复质疑倒挺快的,你看看这个issue,2022年11月18日提的。前一段时间还看见antv团队品牌直播,有空搞这种活动。

业余之外是什么意思,这不是蚂蚁官方维护的项目吗,意思是这不是公司的工作?是靠员工业余在维护吗?不算进你们OKR的?

@hustcc
Copy link
Collaborator

hustcc commented Dec 1, 2023

回复质疑倒挺快的,你看看这个issue,2022年11月18日提的。前一段时间还看见antv团队品牌直播,有空搞这种活动。

业余之外是什么意思,这不是蚂蚁官方维护的项目吗,意思是这不是公司的工作?是靠员工业余在维护吗?不算进你们OKR的?

回复非质疑也挺快的。是蚂蚁官方维护,写进了 OKR,就能接受无脑质疑吗?

接受就事论事,我已经说明了为什么会那么慢,如果要上升到人生攻击,无脑质疑,没法接受。

@zhoujian-official
Copy link

zhoujian-official commented Dec 1, 2023

很好,一个大量用户提了1年多的issue叫“无脑质疑”。
写进了OKR的工作叫“业余之外”。
讨论一下这个项目的性质(公司维护or业余维护)叫“人身攻击”

这叫“接受论事就事”

祝商祺。我们切echarts了。

ps:给看到的其他人说一下:楼上先给我点的👎

pps:临时解法,package.json加一下:

"overrides": {
    "@ant-design/charts": {
      "antd": "^5.11.2",
      "@ant-design/icons": "^5.2.6"
    }
  },

@hustcc
Copy link
Collaborator

hustcc commented Dec 1, 2023

pps:临时解法,package.json加一下:

"overrides": {
    "@ant-design/charts": {
      "antd": "^5.11.2",
      "@ant-design/icons": "^5.2.6"
    }
  },

给解决方案,点赞 👍🏻

@libinglong
Copy link

这不是开源项目吗?人家100年不维护又怎么样呢?

@seilkhanovk
Copy link

I'm really concerned about the unresolved issue here. It's becoming evident that many are affected, and with the shift towards antd 5.0, I anticipate even more will encounter this problem. Could you please provide some insight into what's causing the delay in resolving this? Are there unseen challenges that we're not aware of? Any information or updates on your plans to tackle this issue would be greatly appreciated. Thank you for your attention to this matter

@lxfu1
Copy link
Member

lxfu1 commented Dec 15, 2023

We only have Flowchart depending on antd. If you don't use this chart, you can choose to install the sub-packages @ant-design/[plots|graphs|maps] to avoid this error. Currently, XFlow 2.0 does not have an official website yet, so there should be some stability issues and it cannot be upgraded in a short period of time. Meanwhile, we are also developing Charts 2.0. We have already completed the upgrade of statistical charts and released version 2.0.3. The next step is to upgrade the relationship chart. Please follow V2 branch for updates.

@xsjcTony
Copy link

加油 目前用的antd5 虽然还没用charts 但估计快用到了 💚

@MatteoToqua
Copy link

Also facing this issue, would appreciate some news from the team.
Thank you!!

@tyelin-wong
Copy link

2024年的解决办法,@ant-design/charts 升级到 2.x。

1 similar comment
@tyelin-wong
Copy link

2024年的解决办法,@ant-design/charts 升级到 2.x。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flowchart 流程图X6
Projects
None yet
Development

No branches or pull requests