Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Rollup build failing since Chart.js 3.9

Open t-richard opened this issue 3 years ago • 0 comments

Expected behavior

The build would not fail when running rollup -c.

Current behavior

We're using Chart.js with Typescript and importing it with chart.js/auto.

Since 3.9.0, our rollup build is failing with the follwing error message

Could not resolve '../types/index.esm' from node_modules/chart.js/auto/auto.mts

I think it's related to this change but not entirely sure about why: https://github.com/chartjs/Chart.js/pull/10479

Reproducible sample

https://github.com/t-richard/chartjs-rollup-reproducer

Optional extra steps/info to reproduce

When cloning this repo, running those commands will fail

yarn install
rollup -c

Downgrading to 3.8.2 fixes the build.

Possible solution

No response

Context

This has been encountered in the CI of Symfony UX where we have a Chart.js component. Since the 3.9.0, our build is failing with this error and we can't figure out why or a way to fix it properly.

See for example: https://github.com/symfony/ux/runs/7813370449?check_suite_focus=true

I'll gladly provide any details that may be missing in this report.

Thanks!

chart.js version

3.9.0

Browser name and version

No response

Link to your project

No response

t-richard avatar Aug 15 '22 09:08 t-richard