Description
🔎 Search Terms
"typescript hang","typescript hanging","tsc hanging","pnpm tsc hanging","tsc pnpm turborepo hanging","tsc stuck"
🕗 Version & Regression Information
I can't go back to an old TypeScript version as there are new packages I'm using that depend on newer TypeScript features. As far as I know, TypeScript 4.9.5 runs the build but it produces many errors, and for an unknown reason, if there's a TypeScript error, the compiler doesn't hang
⏯ Playground Link
No response
💻 Code
Use the following repository to reproduce:
You can do it by:
- pnpm install
- cd apps/repro && pnpm tsc
I included a .devcontainer configuration for easy testing or you could use Github Codespaces, it also hangs there.
🙁 Actual behavior
When running TSC inside the apps/repro it simply hangs. That also affects the LSP on Visual Studio Code.
EDIT: Seems like it completes after a long time (5+ minutes) for a single file.
🙂 Expected behavior
Well, it should compile.
Additional information about the issue
I attached a debugger and it seems to be stuck on a for loop inside the src/compiler/core.ts, probably a function outside of that is calling the contains over and over. I may be wrong tho.