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

[Bug] setStaticParamsLocale(locale) -> RangeError: Maximum call stack size exceeded #255

Closed
gustaveWPM opened this issue Oct 19, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@gustaveWPM
Copy link
Contributor

gustaveWPM commented Oct 19, 2023

Describe the bug
This error occurs during the build phase, when calling the yarn build command, during the Generating static pages step.

This error does not occur when using Next.js v13.5.3, but occurs when using Next.js v >= 13.5.4

I've removed all my code, except the

To Reproduce

  1. Clone the next-international-issue branch from: https://github.com/Tirraa/dashboard_rtm/tree/next-international-issue
  2. yarn install
  3. yarn build

The error then occurs. :/

You can inspect the following files, causing the crash:

  • src/app/[locale]/(pages)/[categ]/page.tsx
  • src/app/[locale]/(pages)/[categ]/[subcateg]/page.tsx
  • src/app/[locale]/(pages)/[categ]/[subcateg]/[slug]/page.tsx

If necessary, I will try to create a more minimalistic repo, to have a more precise bug reproduction this week-end.

(Maybe this bug is more related to Next.js than Next International, idk.)


next-international version: >= 1.1.2 (I haven't tested the older versions)
Next.js version: >= 13.5.4

@gustaveWPM gustaveWPM added the bug Something isn't working label Oct 19, 2023
@QuiiBz
Copy link
Owner

QuiiBz commented Oct 19, 2023

This error does not occur when using Next.js v13.5.3, but occurs when using Next.js v >= 13.5.4

Sounds like a Next.js bug then 😅 I'll check this weekend.

@QuiiBz
Copy link
Owner

QuiiBz commented Oct 22, 2023

Small update: setStaticParamsLocale() should be called in pages, not layouts. That's not the case for pages inside dashboard.

Indeed, next@13.5.3 works fine but next@13.5.4 breaks. I've installed each canary between these two versions and found that it starts breaking in 13.5.4-canary.9 - I'd recommend to open an issue on Next.js' GitHub repository as it doesn't seems related to next-international (at least not directly).

@QuiiBz QuiiBz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2023
@gustaveWPM
Copy link
Contributor Author

Small update: setStaticParamsLocale() should be called in pages, not layouts. That's not the case for pages inside dashboard.

Indeed, next@13.5.3 works fine but next@13.5.4 breaks. I've installed each canary between these two versions and found that it starts breaking in 13.5.4-canary.9 - I'd recommend to open an issue on Next.js' GitHub repository as it doesn't seems related to next-international (at least not directly).

Thank you so much!
This seems to be related to: vercel/next.js#56614

@rjnls
Copy link

rjnls commented Oct 24, 2023

I have experienced a slightly different version of this bug with material-tailwind that only occurred during runtime in the browser console. Builds worked, "run dev" worked, solution was the same, everything works in 13.5.3. Even just <Card>Hi</Card> using material-tailwind caused it but for me only after a deployment, not during the build. Hope this helps.

@gustaveWPM
Copy link
Contributor Author

I have experienced a slightly different version of this bug with material-tailwind that only occurred during runtime in the browser console. Builds worked, "run dev" worked, solution was the same, everything works in 13.5.3. Even just Hi using material-tailwind caused it but for me only after a deployment, not during the build. Hope this helps.

Thank you!
I'm also using Material Tailwind (and currently migrating to NextUI). Wait & see...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants