himynameisdave / svelte-frappe-charts

📈 Svelte bindings for frappe-charts.
https://frappe.io/charts
MIT License
310 stars 16 forks source link

<Chart> is not a valid SSR component #23

Closed skanel closed 3 years ago

skanel commented 4 years ago

Any solution for this issue?

<Chart> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules

himynameisdave commented 3 years ago

Duplicate of https://github.com/himynameisdave/svelte-frappe-charts/issues/14.

As of frappe-charts@1.x, the <Chart /> component can never be a valid SSR component because it relies on the window object in the browser. Perhaps this will be fixed in frappe-charts@2.x, which is currently under development.

Regardless though, this is not an issue with this Svelte wrapper library, but is an issue in the underlying frappe-charts library, so I'll be closing this. Feel free to file an issue over there.

melgrove commented 3 years ago

Similar to #14, I fixed this with npm i --save-dev svelte-frappe-charts