Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getServerSideProps makes next-i18next load empty namespaces #1125

Closed
Floffah opened this issue Apr 5, 2021 · 1 comment
Closed

getServerSideProps makes next-i18next load empty namespaces #1125

Floffah opened this issue Apr 5, 2021 · 1 comment

Comments

@Floffah
Copy link

Floffah commented Apr 5, 2021

I probably did something incredibly wrong but I cant figure it out. I followed the docs and re-read them multiple times + tried all the issues I could find related to the topic.

Basically, if you go to https://capp.floffah.dev/ you will see that translations load fine. that site uses getStaticProps. however if you go to https://master.capp.floffah.dev it loads none and when looking at next's data it loads the namespaces but they are just empty objects.

The repository is https://github.com/floffah/collaborated with the project in the packages/web folder.

I am passing the config to the serversidetranslations method (which is used in the same function shared by a util function i made to build almost identical (with the obvious changes) functions for getServerSideProps and getStaticProps) and also to the _app hoc.

Everything works fine in a development environment but if you build it and run the serverless functions, it refuses. The namespace files are definitely on vercel as i can see them but it just doesnt seem to load them.

If you need to build the web run yarn build build --exclude docs,old-server,app in the root of the project

Any ideas? Am I being incredibly stupid?

@isaachinman
Copy link
Contributor

Please post on StackOverflow for help requests. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants