-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chart.js not working with newest sveltekit / vite package #5535
Comments
This is because Chart.js uses extension values that are invalid in Node.js, so Node.js is crashing. It should be |
I've sent chartjs/Chart.js#10479 to Chart.js. At this point, there's nothing to do on the SvelteKit side, so I'm going to close this. |
@benmccann, i added noExternal to my vite.config.js: I still get the error - am I doing something wrong? I am not quite sure if I should put it into the svelte.config.js. |
@Cluster2a the noExternal should be: {
noExternal: ['chart.js']
} And not: {
noExternal: ['Chart.js']
} |
Thanks - I tried it, but it's not working. Still getting this error. |
It looks like it needs to be the following in Vite 3:
Having to put the |
This one was new to me - it's working! Thanks a lot for your incredible work on this project! |
No problem. Thanks for taking the time to put together a reproduction. Hopefully the |
await import seems to work.
package.json
no need to add any line to vite.config.ssr. |
@benmccann I just ran into this today and still had to change I looked at the post you linked and it has been resolved. Is there something I'm doing wrong which still requires me to make those changes? |
Describe the bug
Chat.js is throwing the following error when running with vite 3.0.0 / sveltekit 1.0.0-next.374
The exact same code was working with:
@sveltejs/kit: 1.0.0-next.372
vite: 2.9.14
Reproduction
Logs
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: