You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using serverSideTranslations inside getServerSideProps, the page doesn't load.
It does work with a production build locally, but not if pushed to Vercel.
I know this has to be some kind of deployment issue, but maybe someone knows what I can do about it. I've looked into the next-i18next code trying to understand what's going wrong but I don't have enough NextJS knowledge.
Maybe there's a documentation page for this repo? Aside from the README, I couldn't find anything.
I took the "simple" example from this repo and changed the getStaticProps on the second page to getServerSideProps. Added the missing packages to the package.json and deployed it to vercel (https://simple-2e6voz5th-marvinzeising.vercel.app).
Opening the second page now results in a 500 error page.
On the server, I can see this:
Is getServerSideProps not supported? I found an issue (#652) regarding that but I think that one is quite old.
Expected behaviour
For it to work just like in getStaticProps, I guess.
Screenshots
See above.
OS (please complete the following information)
Device: MBP 2018 15"
Browser: Microsoft Edge Version 89.0.774.54 (Official build) (64-bit)
The text was updated successfully, but these errors were encountered:
@JavierCaroelli@MuhammadHasham23 This issue had nothing to do with getServerSideProps. When deploying to Vercel, you must use path.resolve to force the Vercel serverless build to include your locales directory.
Description
When using
serverSideTranslations
insidegetServerSideProps
, the page doesn't load.It does work with a production build locally, but not if pushed to Vercel.
I know this has to be some kind of deployment issue, but maybe someone knows what I can do about it. I've looked into the next-i18next code trying to understand what's going wrong but I don't have enough NextJS knowledge.
Maybe there's a documentation page for this repo? Aside from the README, I couldn't find anything.
Occurs in next-i18next version
Steps to reproduce
I took the "simple" example from this repo and changed the
getStaticProps
on the second page togetServerSideProps
. Added the missing packages to the package.json and deployed it to vercel (https://simple-2e6voz5th-marvinzeising.vercel.app).Opening the second page now results in a 500 error page.
On the server, I can see this:
Is
getServerSideProps
not supported? I found an issue (#652) regarding that but I think that one is quite old.Expected behaviour
For it to work just like in
getStaticProps
, I guess.Screenshots
See above.
OS (please complete the following information)
The text was updated successfully, but these errors were encountered: