Maximum call stack size exceeded when compiling tsx #46021
Labels
Bug
A bug in TypeScript
Crash
For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output
Fix Available
A PR has been opened for this issue
Milestone
Bug Report
Compilation of tsx file throws generic error
RangeError: Maximum call stack size exceeded
. When the file doesn't contain any tsx element the compilation works as expected.Possible duplicate of:
#45632
🔎 Search Terms
Maximum call stack size exceeded
🕗 Version & Regression Information
4.3 and newer (also tested on 4.5.0-dev.20210923)
⏯ Playground Link
Playground link with relevant code
🙁 Actual behavior
RangeError: Maximum call stack size exceeded
at Object.isFunctionLikeOrClassStaticBlockDeclaration (\node_modules\typescript\lib\tsc.js:9813:27)
at isBlockScope (\node_modules\typescript\lib\tsc.js:11161:28)
at \node_modules\typescript\lib\tsc.js:11242:73
at Object.findAncestor (\npm\node_modules\typescript\lib\tsc.js:9189:26)
at Object.getEnclosingBlockScopeContainer (\npm\node_modules\typescript\lib\tsc.js:11242:19)
at checkNestedBlockScopedBinding (\npm\node_modules\typescript\lib\tsc.js:57015:32)
at checkIdentifier (\npm\node_modules\typescript\lib\tsc.js:56921:13)
at checkExpressionWorker (\npm\node_modules\typescript\lib\tsc.js:63702:28)
at checkExpression (\npm\node_modules\typescript\lib\tsc.js:63657:38)
at checkJsxExpression (\npm\node_modules\typescript\lib\tsc.js:59059:28)
🙂 Expected behavior
compilation with no error
The text was updated successfully, but these errors were encountered: