ant-design-charts
ant-design-charts copied to clipboard
Dependency issue with antd v5.0.0
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.
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.
Same
~fixed:
npm install @ant-design/plots
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'
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?
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.
Hello Team
@ant-design/chartsv1.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
I'm waiting about solution too. =(

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.
Waiting a solution since last year. 😭

Guys, as you know the command
--legacy-peer-depsis 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"
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"
}
}
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.
No update still :(
The library looks great, would love to see an update to v5 so that I can start using it.
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?
Like others here I also fixed this issue by removing the charts package and npm installing @ant-design/plots
嗨,我也面临着提到的问题,蚂蚁图表团队何时会解决这个问题的任何线索?解决方法可能会提供临时修复,但永久解决的预期日期是什么时候?提前谢谢。
着实有点离谱 我看这个issues已经大半年了 还没解决
双手挠头
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
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
August and no update still :(
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?
Please can you fix this issue? It's quite annoying
I would love for this to be fixed thank you for all of your effort !
PLEASE FIX THIS, its been a year 🙄
please fix this issue its been more than a year
Any update on this
Please fix this, More than a year Now!
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)
这个库还维护吗,这个antd的依赖版本问题一年多了都没修。库不维护的话可以标记一下deprecated,以免还有新项目误用这个无人维护的库