(SvelteKit) ApexChart initialization causes "window is not defined" error on reload #4175
Replies: 2 comments
-
I managed to find a solution, but it seems very hacky... Maybe someone can help me improve my code? (Code: https://github.com/Arbee4ever/statcord_website/blob/development/src/routes/leaderboards/%5BguildId%5D/%2Bpage.svelte#L37) |
Beta Was this translation helpful? Give feedback.
-
Commenting to say that the solution from this svelte-apexcharts issue worked for me! First: Here's my
The
Here's a sample component –
The For what it's worth, I use adapter-static:
Hope this helps someone! |
Beta Was this translation helpful? Give feedback.
-
When I use this library in my SvelteKit project, I get a "window is not defined" error when I reload the page. Any idea why? (Code: https://github.com/Arbee4ever/statcord_website/blob/development/src/components/leaderboard/Member.svelte#L62)
Error:
Beta Was this translation helpful? Give feedback.
All reactions