We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
window.navigator
N/A
I upgraded my SvelteKit example to use the latest version (1.14.x), but experienced an error related to SSR.
window.navigator is a browser API, so it should be guarded against.
Stack trace leads to this line in configuration.ts:
configuration.ts
carbon-charts/packages/core/src/configuration.ts
Line 79 in 417dd7b
Related PR: #1751
I first started seeing this in 1.14.x
1.13.x works fine.
See the example repo: https://github.com/metonym/carbon-charts-svelte-examples/tree/master/sveltekit
9:42:37 AM [vite] Error when evaluating SSR module /node_modules/@carbon/charts-svelte/dist/AlluvialChart.svelte: failed to import "@carbon/charts" |- ReferenceError: navigator is not defined at <redacted>/carbon-charts-svelte-examples/sveltekit/node_modules/@carbon/charts/dist/color-scale-utils-BosGSMyP.mjs:1867:10 at ModuleJob.run (node:internal/modules/esm/module_job:194:25) 9:42:37 AM [vite] Error when evaluating SSR module /node_modules/@carbon/charts-svelte/dist/index.js: failed to import "/node_modules/@carbon/charts-svelte/dist/AlluvialChart.svelte" |- ReferenceError: navigator is not defined at <redacted>/carbon-charts-svelte-examples/sveltekit/node_modules/@carbon/charts/dist/color-scale-utils-BosGSMyP.mjs:1867:10 at ModuleJob.run (node:internal/modules/esm/module_job:194:25) 9:42:37 AM [vite] Error when evaluating SSR module /src/lib/Basic.svelte: failed to import "/node_modules/@carbon/charts-svelte/dist/index.js" |- ReferenceError: navigator is not defined at <redacted>/carbon-charts-svelte-examples/sveltekit/node_modules/@carbon/charts/dist/color-scale-utils-BosGSMyP.mjs:1867:10 at ModuleJob.run (node:internal/modules/esm/module_job:194:25) 9:42:37 AM [vite] Error when evaluating SSR module /src/routes/+page.svelte: failed to import "/src/lib/Basic.svelte" |- ReferenceError: navigator is not defined at <redacted>/carbon-charts-svelte-examples/sveltekit/node_modules/@carbon/charts/dist/color-scale-utils-BosGSMyP.mjs:1867:10 at ModuleJob.run (node:internal/modules/esm/module_job:194:25) ReferenceError: navigator is not defined at <redacted>/carbon-charts-svelte-examples/sveltekit/node_modules/@carbon/charts/dist/color-scale-utils-BosGSMyP.mjs:1867:10 at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
https://github.com/metonym/carbon-charts-svelte-examples/tree/master/sveltekit
P4
The text was updated successfully, but these errors were encountered:
I marked this as a high priority bug as I believe it impacts all and any SSR usage.
Sorry, something went wrong.
If you're experiencing this, this is now patched in version 1.14.2.
Successfully merging a pull request may close this issue.
Application/Team
N/A
What happened?
I upgraded my SvelteKit example to use the latest version (1.14.x), but experienced an error related to SSR.
window.navigator
is a browser API, so it should be guarded against.Stack trace leads to this line in
configuration.ts
:carbon-charts/packages/core/src/configuration.ts
Line 79 in 417dd7b
Related PR: #1751
Version
I first started seeing this in 1.14.x
1.13.x works fine.
Data & options used
Relevant log output
StackBlitz example
https://github.com/metonym/carbon-charts-svelte-examples/tree/master/sveltekit
What priority level would this be in your opinion?
P4
The text was updated successfully, but these errors were encountered: