You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like the lib is not compatible with Highcharts v12.
[vite] (ssr) Error when evaluating SSR module /src/routes/+page.svelte: Cannot read properties of undefined (reading 'createEvent')
at tt (/Volumes/Data/workspace/huggingface/test/demo/node_modules/highcharts/highstock.js:9:2040)
at setOptions (/Volumes/Data/workspace/huggingface/test/demo/node_modules/highcharts/highstock.js:9:17013)
at Object.compose (/Volumes/Data/workspace/huggingface/test/demo/node_modules/highcharts/highstock.js:9:281239)
at dQ.compose (/Volumes/Data/workspace/huggingface/test/demo/node_modules/highcharts/highstock.js:9:291627)
at /Volumes/Data/workspace/huggingface/test/demo/node_modules/highcharts/highstock.js:9:374371
at /Volumes/Data/workspace/huggingface/test/demo/node_modules/highcharts/highstock.js:16:53
at /Volumes/Data/workspace/huggingface/test/demo/node_modules/highcharts/highstock.js:8:83
at Object.<anonymous> (/Volumes/Data/workspace/huggingface/test/demo/node_modules/highcharts/highstock.js:8:329)
at Module._compile (node:internal/modules/cjs/loader:155
The text was updated successfully, but these errors were encountered:
You're trying to use it in SvelteKit, not in Svelte. In SvelteKit there is no window object available at Highcharts evaluation time which will lead to errors. Either disable SSR and make the import only when your page is already in the browser (not on the server):
import { browser } from '$app/environment';
let clientLib;
if (browser) {
import('client-side-library').then((module) => {
clientLib = module.default;
// Use clientLib here.
});
}
Looks like the lib is not compatible with Highcharts v12.
The text was updated successfully, but these errors were encountered: