Closed as not planned
Closed as not planned
Copy link
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
Bug Report
🔎 Search Terms
- "RangeError: Maximum call stack size exceeded at inferFromTypes"
- "inferFromTypes"
🕗 Version & Regression Information
- This changed between versions 5.0.4 and 5.1.3
- Seems to be fixed when running
npm install typescript@next //(5.2.0-dev.20230606)
💻 Code
npm run build
🙁 Actual behavior
Build error occurred
RangeError: Maximum call stack size exceeded
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:654
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:65459:11)
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:65459:11)
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:65459:11)
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:65459:11)
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:65459:11)
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:65459:11)
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:654
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:65459:11)
at inferFromTypes (C:\***\node_modules\typescript\lib\typescript.js:65459:11) {
type: 'RangeError'
}
🙂 Expected behavior
Build completed with no errors.
Reacted by Nico, Alex Richardson, Ezequiel Fabbroni, Ryan Rampersad, David, Isaac Husemann, Rami Jarrar, Henrique Marques Fernandes, bb-mmacecek, Michael Hays and 9 more
Reacted by Felipe Kawassaki and kennethslee613
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Activity
dbrxnds commentedon Jun 7, 2023
Hi, we are also running into this issue on 5.1.3. Initially thought it was due to the size of our Prisma schema / types.
Not sure what I can do to help debug this, but willing to if anyone has ideas.
paradoxloop commentedon Jun 7, 2023
We have this issue. too. Like JP Wogaman II (@jpwogaman) this is fixed for us by using a higher dev version of typescript:
npm install typescript@next //(5.2.0-dev.20230606)fatcerberus commentedon Jun 7, 2023
Nobody has a repro?
AntQwanlity commentedon Jun 10, 2023
#54348
janpio commentedon Jun 14, 2023
Here is another potentially related case: #54618
And I just commented there with a reproduction (Using Next.js, Prisma and Mongoose): #54618 (comment)
Update: I can confirm that
typescript@5.2.0-dev.20230606indeed fixes it.5.2.0-dev.20230605is still broken, but..06works.Jolg42 commentedon Jun 14, 2023
With Jan Piotrowski (@janpio) we could find that
5.2.0-dev.20230606fixes the issue in mentioned reproduction.I checked the changes that happened in 5.2 for that daily version I could see that
#54507 was backported to 5.1
#54538 was not backported yet
So it seems to me that this would be fixed once #54538 would be backported to 5.1?
jakebailey commentedon Jun 14, 2023
The first PR should be enough to fix the crash. The second is a cleanup and potential perf boost (which we rarely backport).
This issue is really just a duplicate of #54348 which will be fixed in the next 5.1 patch (not yet released).
build(deps): downgrade to TypeScript 5.0.4
suzan-rana commentedon Jun 16, 2023
Hi facing the same error using Next 13 app dir, prisma, typescript: 5.1.3, prisma: 4.15.0


suzan-rana commentedon Jun 16, 2023
It worked guys.

typescript-bot commentedon Jun 19, 2023
This issue has been marked as 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
zakiego commentedon Jun 30, 2023
Also fixed with
5.2.0-dev.20230629