chartjs / chartjs-adapter-luxon

Luxon adapter for Chart.js
MIT License
33 stars 24 forks source link

Import issue with chartjs-adapter-luxon 1.2.1 #78

Closed paulsingh closed 1 year ago

paulsingh commented 1 year ago

After upgrading to chartjs-adapter-luxon@1.2.1 (and chart.js@4.0.1), I get the following error:

Error: Failed to resolve entry for package "chart.js". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "chart.js" package

Edit: upon a bit more digging, it seems to only throw this error when running server-side (eg, SSR). No error when run client-side.

benmccann commented 1 year ago

This is a weird error message because it's about chart.js which is mostly packaged fine (though I did notice one issue: https://github.com/chartjs/Chart.js/pull/10880).

That being said, the packaging for this library is not good. It has a UMD file in main, which is not very friendly for most npm users and should really only be used with script tags, CDNs, etc. We should update this package to match the packaging of the main Chart.js library