ant-design-charts icon indicating copy to clipboard operation
ant-design-charts copied to clipboard

Dependency issue with antd v5.0.0

Open alenocera opened this issue 2 years ago • 42 comments
trafficstars

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

npm ERR! Found: [email protected] 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/[email protected] 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.

alenocera avatar Nov 18 '22 13:11 alenocera

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.

lxfu1 avatar Nov 24 '22 09:11 lxfu1

Same

~fixed: npm install @ant-design/plots

b5414 avatar Dec 06 '22 13:12 b5414

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'

niranjanborawake avatar Dec 09 '22 12:12 niranjanborawake

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?

osabros avatar Dec 14 '22 10:12 osabros

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.

niranjanborawake avatar Dec 16 '22 10:12 niranjanborawake

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

letrape avatar Dec 24 '22 14:12 letrape

I'm waiting about solution too. =(

image

Orkuml avatar Jan 05 '23 14:01 Orkuml

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.

alenocera avatar Jan 09 '23 09:01 alenocera

Waiting a solution since last year. 😭

image

RosaErick avatar Jan 24 '23 18:01 RosaErick

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"

d00rsfan avatar Feb 27 '23 08:02 d00rsfan

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"
    }
  }

ildfreelancer avatar Mar 18 '23 09:03 ildfreelancer

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.

vgs18 avatar Mar 27 '23 06:03 vgs18

No update still :(

arifszn avatar Mar 31 '23 10:03 arifszn

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

hassssan051 avatar Apr 03 '23 06:04 hassssan051

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?

Orkuml avatar Apr 13 '23 20:04 Orkuml

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

jdlms avatar Apr 13 '23 21:04 jdlms

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

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

gujiwuqing avatar Apr 25 '23 02:04 gujiwuqing

双手挠头

zhengmenghuang avatar Apr 27 '23 11:04 zhengmenghuang

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

lxfu1 avatar May 30 '23 11:05 lxfu1

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

gabuvi7 avatar Jun 20 '23 20:06 gabuvi7

August and no update still :(

RosaErick avatar Aug 04 '23 18:08 RosaErick

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?

kamivisionvaibhav avatar Aug 05 '23 04:08 kamivisionvaibhav

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

Ranzeb avatar Aug 07 '23 14:08 Ranzeb

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

RusseII avatar Aug 14 '23 16:08 RusseII

PLEASE FIX THIS, its been a year 🙄

ketangupta34 avatar Oct 06 '23 11:10 ketangupta34

please fix this issue its been more than a year

AnandD17 avatar Nov 16 '23 07:11 AnandD17

Any update on this

Tantatorn-dev avatar Nov 17 '23 07:11 Tantatorn-dev

Please fix this, More than a year Now!

schidobvu avatar Nov 29 '23 07:11 schidobvu

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)

lxfu1 avatar Nov 29 '23 07:11 lxfu1

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

zhoujian-official avatar Dec 01 '23 08:12 zhoujian-official