I'm currently embedding ThoughtSpot Visual Embed SDK using NextJS 15. While it was working fine previously, it now shows the following error when running the app::
Uncaught ReferenceError: window is not defined at storeValueInWindow (file://<project-path>/node_modules/@thoughtspot/visual-embed-sdk/cjs/src/utils.js:314:5) at createAndSetInitPromise (file://<project-path>/node_modules/@thoughtspot/visual-embed-sdk/cjs/src/embed/base.js:141:36) at Object.<anonymous> (file://<project-path>/node_modules/@thoughtspot/visual-embed-sdk/cjs/src/embed/base.js:147:37) at Module._compile (node:internal/modules/cjs/loader:1562:14) at Object..js (node:internal/modules/cjs/loader:1699:10) at Module.load (node:internal/modules/cjs/loader:1313:32) at Function._load (node:internal/modules/cjs/loader:1123:12) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) at Module.<anonymous> (node:internal/modules/cjs/loader:1335:12) at mod.require (file://<project-path>/node_modules/next/dist/server/require-hook.js:65:28) at require (node:internal/modules/helpers:136:16) at Object.<anonymous> (file://<project-path>/node_modules/@thoughtspot/visual-embed-sdk/cjs/src/utils/processData.js:5:16) at Module._compile (node:internal/modules/cjs/loader:1562:14) at Object..js (node:internal/modules/cjs/loader:1699:10)
Uncaught ReferenceError: window is not defined at storeValueInWindow (file://<project-path>/node_modules/@thoughtspot/visual-embed-sdk/cjs/src/utils.js:314:5) at createAndSetInitPromise (file://<project-path>/node_modules/@thoughtspot/visual-embed-sdk/cjs/src/embed/base.js:141:36) at Object.<anonymous> (file://<project-path>/node_modules/@thoughtspot/visual-embed-sdk/cjs/src/embed/base.js:147:37) at Module._compile (node:internal/modules/cjs/loader:1562:14) at Object..js (node:internal/modules/cjs/loader:1699:10) at Module.load (node:internal/modules/cjs/loader:1313:32) at Function._load (node:internal/modules/cjs/loader:1123:12) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) at Module.<anonymous> (node:internal/modules/cjs/loader:1335:12) at mod.require (file://<project-path>/node_modules/next/dist/server/require-hook.js:65:28) at require (node:internal/modules/helpers:136:16) at Object.<anonymous> (file://<project-path>/node_modules/@thoughtspot/visual-embed-sdk/cjs/src/utils/processData.js:5:16) at Module._compile (node:internal/modules/cjs/loader:1562:14) at Object..js (node:internal/modules/cjs/loader:1699:10)
As per my understanding, the SDK is mounting over the server side which is causing this error. Any sort of insight or help would be appreciated! Thanks
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community