Skip to content

5.1.3 - RangeError: Maximum call stack size exceeded at inferFromTypes - Maybe Fixed with 5.2.0-dev.20230606 #54549

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

Closed
jpwogaman opened this issue Jun 6, 2023 · 11 comments
Labels
Duplicate An existing issue was already created

Comments

@jpwogaman
Copy link

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.

@dbrxnds
Copy link

dbrxnds commented 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
Copy link

We have this issue. too. Like @jpwogaman this is fixed for us by using a higher dev version of typescript:

npm install typescript@next //(5.2.0-dev.20230606)

@fatcerberus
Copy link

Nobody has a repro?

@AntQwanlity
Copy link

#54348

@janpio
Copy link

janpio commented 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 [email protected] indeed fixes it. 5.2.0-dev.20230605 is still broken, but ..06 works.

@Jolg42
Copy link

Jolg42 commented Jun 14, 2023

With @janpio we could find that 5.2.0-dev.20230606 fixes 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
Copy link
Member

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).

@jakebailey jakebailey added the Duplicate An existing issue was already created label Jun 14, 2023
tfkhdyt added a commit to tfkhdyt/portfolio-website that referenced this issue Jun 16, 2023
@suzan-rana
Copy link

Hi facing the same error using Next 13 app dir, prisma, typescript: 5.1.3, prisma: 4.15.0
image
image

@suzan-rana
Copy link

It worked guys.
image

@typescript-bot
Copy link
Collaborator

This issue has been marked as 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@zakiego
Copy link

zakiego commented Jun 30, 2023

Also fixed with 5.2.0-dev.20230629

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests