-
Notifications
You must be signed in to change notification settings - Fork 12.8k
TS 5.1.1-rc: RangeError: Maximum call stack size exceeded #54348
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
Comments
This bisects to #53365, but reverting it doesn't actually fix the problem and it doesn't really make sense anyway. Really strange. |
Ah, I see what's wrong here. |
Apparently, no, what I thought was wrong was not wrong. I can only think that there's some form of corruption happening here. Except that now, I can't get this to break on main. Doing a bisect then says that we somehow fixed it on main in #54125, which is totally ridiculous. |
Thank you for looking @jakebailey ... let me know if I can be of any "modest" help. |
same here on 5.1.3 and even 5.0.4. Running with the fix from @jakebailey fixes the issue. |
@jakebailey if it helps I've upgraded to ts 5.1.3 and still have the same issue cd /tmp
git clone https://github.com/belgattitude/nextjs-monorepo-example.git --branch typescript-5.1.3
yarn install
cd apps/nextjs-app
yarn typecheck The output I have / Linux - node 18
There's different apps in this monorepo, so I've checked on package on which nextjs-app depends (via tsconfig path aliases) cd packages/ui-lib
yarn typecheck Outputs:
So it's possible there's a relation. And let you know |
This is also an issue with nestjs, which uses parameter decorators extensively. |
This was really weird, but I figured it out. The code added in #53246 directly checks the object flags of the type. When this code executes, I'm looking into a proper fix now. |
I noticed in the release notes that decorators require disabling the previous compiler flags. Should the compiler at least warn that those config settings are enabled if its related to this issue? |
This issue is not at all reserved to decorators; I have multiple test cases which exhibit this bug which do not involve decorators. This is just a bug that will be fixed and very likely backported to the next patch release of 5.1. |
Any temporary workaround for this issue ? |
You could use the build on my PR: #54507 (comment) Or, just downgrade back to 5.0... 5.1's only been out for a couple of days. |
Bug Report
Tried an upgrade to 5.1.1-rc from 5.0.4 and got a
RangeError: Maximum call stack size exceeded
for one of the app of the monorepo (nextjs, mui, i18next,...). Others apps and packages works.You'll find a reproduction here: belgattitude/nextjs-monorepo-example#3826 with explanation.
git clone https://github.com/belgattitude/nextjs-monorepo-example.git --branch typescript-5.1.1-rc yarn install cd apps/nextjs-app yarn typecheck
Note that this repo uses yarn 4.0.0-rc.44 with node_modules linker.The cause might be linked to that as well. But in general this example repo used to work across ts updates quite well.
The error is visible on the CI https://github.com/belgattitude/nextjs-monorepo-example/actions/runs/5049578076/jobs/9059197251?pr=3826 and reproduced locally on linux / node 18.16
Just wanted to let you know, didn't had time to investigate.
Huge thx for ts team, I really appreciate what you're doing ❤️
🔎 Search Terms
🕗 Version & Regression Information
⏯ Playground Link
belgattitude/nextjs-monorepo-example#3826 with explanation.
git clone https://github.com/belgattitude/nextjs-monorepo-example.git --branch typescript-5.1.1-rc yarn install cd apps/nextjs-app yarn typecheck
The text was updated successfully, but these errors were encountered: