-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
Is there a way to make localeSubpaths from the beta compatible with getStaticPaths/-Props? #747
Comments
Why not hard code it, or treat it as any other variable? |
The problem is this snippet:
because it calls As long as localeSubpaths is an empty object - no problem. Once it's populated, the error is thrown. Can you think of any solution or workaround? Edit: Even when commenting out the snippet, the error still arises. Unfortunately, I don't know where it comes from |
@borispoehland I don't understand what you mean. |
Yes, I know. When running I don't know why this is the case, tho... |
Can you provide a reproducible repo? |
Yes, here: https://github.com/borispoehland/next-i18next-getStaticProps-Error npm run build leads to an error, due to getStaticProps being used. Thanks Isaac for investigating!! |
@borispoehland Very strange that they don't provide a stack trace with that error. Anyways, it looks like the problem here is that Hope that makes sense! |
@isaachinman but my app isn't fully static, only one single page of it is (the page with getStaticProps). I'm relatively new to next.js, for the particular situation that I'm stuck in, can you provide some configurational workaround? |
We cannot generate a static page at all if you desire There is no workaround - the redirect functionality has to exist at some level. If you wanted a static app that still supports |
@isaachinman thanks, that's the clear answer I was looking for! Fortunately, I was able to replace Thank you for your support! |
No problem. The question of redirects is an interesting one, and may end up being the last piece of the puzzle when it comes to static/SSG locale subpath support. I can discuss with the NextJs team. Good luck with your project! |
@isaachinman Is there a bank account of you that I can donate some euros to? I think you make great work |
@borispoehland You can sponsor my work via GitHub sponsors, or contact me directly via email. Thanks! |
@isaachinman is there an alternate way (you can think of) to propagate
localeSubpaths
that's compatible withgetStaticPaths
?Originally posted by @borispoehland in #274 (comment)
The text was updated successfully, but these errors were encountered: