Closed geryfauzi closed 1 year ago
Look into adding catch
on errors when fetching definitions. Probably something isn't working with another part required for this approach (/api/proxy-definitions
file).
I noticed is you're sending all flags to the client in a cookie, and this has a significant overhead. If you're not making decisions related to flags in middleware, maybe client-side approach will be a better match for this.
Describe the bug
When i'm using next-i18next with middleware, it work fine in development mode (e.g yarn dev). But when i test it in production mode (e.g yarn build then yarn start), its not working anymore. It gave an error saying "Error: Initial locale argument was not passed into serverSideTranslations". Fyi my nextjs version is 13.0.2 and my next-i18next version is 12.1.0.
P.S : If i'm changing the middleware (change it into anything beside using unleash) it work fine. It's only error when i'm using unleash.
Steps to reproduce the bug
I'm adding middleware to my nextjs Project. Here it's the code :
My next-i18next configuration :
Expected behavior
The app should working fine as its work fine in developmen mode
Logs, error output, etc.
Screenshots
No response
Additional context
No response
Unleash version
1.2.0
Subscription type
None
Hosting type
Self-hosted
SDK information (language and version)
No response