chartjs/chartjs-adapter-luxon

Import issue with chartjs-adapter-luxon 1.2.1

paulsingh opened this issue · 1 comments

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.

This is a weird error message because it's about chart.js which is mostly packaged fine (though I did notice one issue: chartjs/Chart.js#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