Closed alvarolozano closed 3 weeks ago
The detectLanguageFromHeaders is supposed to be a SERVER function, but it is calling the detectLanguage function which is supposed to be a CLIENT function
detectLanguageFromHeaders
detectLanguage
https://github.com/tolgee/tolgee-js/blob/358707421c721a0454f6be9d2963ccf27820ba76/packages/web/src/package/tools/detectLanguageFromHeaders.ts#L9
So this line makes the initialization to fail, because it is calling the window object from the server. https://github.com/tolgee/tolgee-js/blob/358707421c721a0454f6be9d2963ccf27820ba76/packages/web/src/package/LanguageDetector.ts#L13
Possibly fixed in https://github.com/tolgee/tolgee-js/pull/3401
Fixed in #3401
The
detectLanguageFromHeaders
is supposed to be a SERVER function, but it is calling thedetectLanguage
function which is supposed to be a CLIENT functionhttps://github.com/tolgee/tolgee-js/blob/358707421c721a0454f6be9d2963ccf27820ba76/packages/web/src/package/tools/detectLanguageFromHeaders.ts#L9
So this line makes the initialization to fail, because it is calling the window object from the server. https://github.com/tolgee/tolgee-js/blob/358707421c721a0454f6be9d2963ccf27820ba76/packages/web/src/package/LanguageDetector.ts#L13