-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Compiler takes a long time, then throws: "RangeError: Value undefined out of range for undefined options property undefined" #44796
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
Here is the entire stack trace.
|
No. The compiler should never crash. I’m assuming you can’t share the project that causes this? Any additional info you could share, or if you can manage to create a contained reproduction, would be super helpful. I’m not sure there’s anything we can do with just this stack trace. |
@andrewbranch I managed to yank enough stuff from my codebase to create a reproducible mini-project. The killer step was when I added:
Obviously, this library Will probably need to be dug into by someone who is a ts expert. |
Fantastic, thanks @panta82! |
Possibly related: #45249.
|
This looks like it’s already fixed—no crash in 4.4-beta or nightly. |
Bug Report
🔎 Search Terms
"RangeError", "Value undefined out of range for undefined options property undefined"
🕗 Version & Regression Information
Compiler language server slows down to a crawl and stops giving answers.
tsc
command line utility crashes with the following stack trace:This started happening when I went perhaps a bit overboard with generics.
It showed up in 4.3.4. I went back to 4.2.x and it's still there.
Node version: v14.17.0
⏯ Playground Link
Sorry, this happens in a complicated project, I don't know how to extract it.
💻 Code
See above
🙁 Actual behavior
Compiler slows down and crashes during build.
🙂 Expected behavior
Compiler can deal with my fancy generics :)
I know this is not a lot to go on. I am primarily curious what should I do now?
Is this the normal behavior of tsc? Eg. if you push it too hard, it crashes? And I should just remove some of the generics and move on?
Or is this a genuine bug. And the compiler either shouldn't have stalled, or there should have been some mechanism where it aborts compilation with "things are too complex" error message?
If the latter is the case, I am open to trying to extract the situation into some kind of mini project or reproducible use case.
Thanks.
The text was updated successfully, but these errors were encountered: