chartjs-plugin-annotation: Error: 'distanceBetweenPoints' is not exported by node_modules/chart.js/helpers/helpers.cjs
Hi, upgrading charts.js from 4.1.1 to 4.1.2 (see https://github.com/honzajavorek/junior.guru/pull/1046) causes my CI to fail on this:
[07:25:10] 'buildJS' errored after 11 s
[07:25:10] Error: 'distanceBetweenPoints' is not exported by node_modules/chart.js/helpers/helpers.cjs, imported by node_modules/chartjs-plugin-annotation/dist/chartjs-plugin-annotation.esm.js
I use rollup to build the JS, but the setup is pretty simple as I use just a few lines of extra JS on my site. I’m not sure what I can do about it. Please advise what other info would help to debug this issue, or how otherwise can I contribute to the solution.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18
@honzajavorek let me inform you that Chart.js 4.2.0 has been released with the PR which should solve this issue. I have tested locally your project with
and the building is working without any issue.
If you can confirm that it’s working for you as well, we can close the issue.
@stockiNail Wow, thank you! This is so much more than I’d expect ❤️ My project isn’t exactly contributions-friendly (not yet), so thanks for going this far and trying it out like this. I’m fine waiting for next releases, I’m in no rush. Hopefully this helps anyone who could have a similar problem.
Click here for offtopic info about what I'm using this library for…
If you are curious, junior.guru is a small project where I'm trying to be as transparent as possible about its financial results. I have open stats. Your library helps me to have vertical lines in my charts so I can mark individual years or milestones.Hi, I’ve had a few days of vacation. Dependabot created PRs with the upgrades for me, and both were green, so I merged them yesterday night so I’m on the latest versions. And it seems to be all working now! Thanks so much for fixing this and helping with this issue ❤️
Thank you! I’ll have a look, more in deep to understand what’s wrong.
The PR has been applied. As soon as new patch version will be released, the issue should be solved.