Hello, I got this error on SuperTokens module in w...
# support-questions-legacy
d
Hello, I got this error on SuperTokens module in windowHandler while building with Next.js my App:
Copy code
info  - Collecting page data .Error: If you are using this package with server-side rendering, please make sure that you are checking if the window object is defined.
    at getWindowOrThrow (D:\Progetti\OH\SORGENTI\openhospital-portal-mui\patient-portal-ui-next\node_modules\supertokens-website\lib\build\utils\windowHandler\defaultImplementation.js:137:15)
    at Object.getDocument (D:\Progetti\OH\SORGENTI\openhospital-portal-mui\patient-portal-ui-next\node_modules\supertokens-website\lib\build\utils\windowHandler\defaultImplementation.js:291:16)
    [...]
r
hey @der_suchende could you please elaborate?
d
Sorry, what do you mean?
supertokens-website gives error becouse dont'find the window object while buildin my supertokens next.js app with npm run build command
This is the throwed message: Collecting page data .Error: If you are using this package with server-side rendering, please make sure that you are checking if the window object is defined.
r
right. You need to initialise the frontend SDK only if the window object is available.
d
How can I proceed to set window object available?
r
You don’t have to set it, you have to init the frontend SDK only if it’s available. Please see our guides.
d
Thank you
32 Views