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

Update dependency chart.js@"^4.0.0" #56

Open
ram-you opened this issue Nov 16, 2022 · 6 comments
Open

Update dependency chart.js@"^4.0.0" #56

ram-you opened this issue Nov 16, 2022 · 6 comments

Comments

@ram-you
Copy link

ram-you commented Nov 16, 2022

Please update Chart.js dependency to chart.js@"^4.0.0".
Thank you.

@LeeLenaleee
Copy link
Contributor

LeeLenaleee commented Nov 17, 2022

The peerDependency is "chart.js": ">=2.8.0" so it should work fine with 4.0

@stevecastaneda
Copy link

When upgrading to chart.js@4.0.1, here are the warnings I receive.

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [redacted]@0.1.0
npm WARN Found: chart.js@4.0.1
npm WARN node_modules/chart.js
npm WARN   peer chart.js@">=2.8.0" from chartjs-adapter-date-fns@2.0.1
npm WARN   node_modules/chartjs-adapter-date-fns
npm WARN     chartjs-adapter-date-fns@"^2.0.0" from the root project
npm WARN   1 more (the root project)

@stevecastaneda
Copy link

stevecastaneda commented Nov 19, 2022

Reproduction of my error in this repl. The chart data was just pulled from an example, but what triggers the error is when the Chart tries to use the adapter when specifying a scale as a time or timeseries.

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /home/runner/KnowingFlawlessIrc/node_modules/chart.js/package.json

Would you like me to post this as a separate issue?

@adamhp
Copy link

adamhp commented Dec 10, 2022

Any ideas on how to work around this until there is a fix? @stevecastaneda

@stevecastaneda
Copy link

stevecastaneda commented Dec 10, 2022

Any ideas on how to work around this until there is a fix? @stevecastaneda

I ended up just removing the plugin, and created the labels as strings when polling for chart data (moving the logic on how I wanted the dates to the backend). I planned to add it back in once I saw a release.

@adamhp
Copy link

adamhp commented Dec 10, 2022

@stevecastaneda I think I was able to fix the package.json in #62, but not sure if there are wider impacts with that type of change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants