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

Rollup build failing since Chart.js 3.9 #10599

Closed
t-richard opened this issue Aug 15, 2022 · 2 comments
Closed

Rollup build failing since Chart.js 3.9 #10599

t-richard opened this issue Aug 15, 2022 · 2 comments
Milestone

Comments

@t-richard
Copy link

t-richard commented Aug 15, 2022

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: #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

inureyes added a commit to lablup/backend.ai-webui that referenced this issue Aug 30, 2022
 * electron should be kept for cookie-based login support (will be
   replaced soon.)
 * chart.js 3.9 has rollup build problem with ESM support. see (
   chartjs/Chart.js#10599 , chartjs/Chart.js#10479 )
@weaverryan
Copy link

Hi!

Does anyone have any hints on this one? The reproducer above is about as simple as we can make it - but we're having trouble understanding how this might be fixed.

Thanks :)

@LeeLenaleee
Copy link
Collaborator

This is resolved in V4 by #10661

@LeeLenaleee LeeLenaleee added this to the Version 4.0 milestone Sep 19, 2022
weaverryan added a commit to weaverryan/ux that referenced this issue Sep 20, 2022
In 3.9, they broke typescript with chart.js/auto - see chartjs/Chart.js#10599

It will be fixed in 4.0.
weaverryan added a commit to symfony/ux that referenced this issue Sep 20, 2022
This PR was squashed before being merged into the 2.x branch.

Discussion
----------

Restricting chart.js to 3.8.2

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Tickets       | Fixes tests
| License       | MIT

In 3.9, they broke typescript with chart.js/auto - see chartjs/Chart.js#10599

It will be fixed in 4.0... that's the best we can do I think :).

I DID leave the peer dependencies alone, as I believe a user using 3.9 will still work.

Commits
-------

8809368 Restricting chart.js to 3.8.2
web9app6 added a commit to web9app6/ux that referenced this issue Aug 1, 2023
This PR was squashed before being merged into the 2.x branch.

Discussion
----------

Restricting chart.js to 3.8.2

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Tickets       | Fixes tests
| License       | MIT

In 3.9, they broke typescript with chart.js/auto - see chartjs/Chart.js#10599

It will be fixed in 4.0... that's the best we can do I think :).

I DID leave the peer dependencies alone, as I believe a user using 3.9 will still work.

Commits
-------

8809368 Restricting chart.js to 3.8.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants