NextJS 14 window is not defined #2670
Unanswered
alvarolozano
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Thanks for reporting, I'll investigate. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I followed the whole guide to setup the tolgee for NextJS app router (https://docs.tolgee.io/js-sdk/integrations/react/next/app-router) and when the detectLanguageFromHeaders is invoked, it gives me the following error
Also, if I omit that part and set the language directly to de default it is working.
By researching in the code, I found that the DetectLanguage method called from the detectLanguageFromHeaders reads the window object, and as it is a server side code, it fails
Beta Was this translation helpful? Give feedback.
All reactions