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
SSG not possible in app directory #1144
Comments
Similarly to #1142, this hack allows the build to complete so it seems at least partially related to the next config |
@nickderobertis-ch have you tried properly typing the lang variables?
I can build just fine, just run into some other issues where I get "Warning: Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." but thats related to some other thing I fucked up myself. Nvm i see you're on JS.. |
Yeah JS for this reproduction but I originally hit this issue in our TS codebase properly typed. I think this is actually due to an issue in NextJS itself: vercel/next.js#55331 |
Ah. Honestly it's starting to feel like a mistake that we went for next js at all. The documentation doesn't seem to cover many advanced / complex implementations of the stuff they themselves offer which leads to running in to dumb errors. Especially if you're migrating from pages to app router. |
What version of this package are you using?
v2.5.3
What operating system, Node.js, and npm version?
MacOS, v18.7.0, 8.15.0
What happened?
Building NextJS with app directory,
[lang]
paths, andgenerateStaticParams
fails, with errors such as these (one per language):I have a full reproduction here on the ssg-bug branch, simply run
yarn build
. I simply used the NextJS official example for next-translate, upgraded to the latest working versions (see #1142), then addedgenerateStaticParams
.What did you expect to happen?
Build completes successfully with statically generated language pages.
Are you willing to submit a pull request to fix this bug?
I am motivated to get this fixed quickly, so I would be willing to help but I am not familiar with the internals of
next-translate
ornext
. With some guidance I would be happy to do the heavy lifting.The text was updated successfully, but these errors were encountered: