Closed BertCatsburg closed 3 years ago
i18next-localstorage-backend is only for browser usage... it was never designed to work also on server side.
That means that i18next-localstorage-backend cannot be used in NextJS projects?
Packages which are able to work on Server Side but have functionality only available on Client Side are usually testing if the 'window' variable is available before using it. So, the Server Side ignores the piece of code with the 'window', and it's picked up on Client Side and works as expected.
See the Pull Request. It's my first one on public github, so please let me know if I forgot something in the process.
🐛 Bug Report
I'm getting an error on i18next-localstorage-backend:
To Reproduce
Use this package in a NextJS environment.
Expected behavior
We expect that this package handles 'window' in SSR environments by, for example, checking for the 'window' variable and ignoring SSR.
Your Environment
Relevant packages in package.json: