Description
🔎 Search Terms
"tsBuildInfoFile", "tsBuildInfoFile without incremental", "tsBuildInfoFile without incremental or composite", "TS5111"
🕗 Version & Regression Information
- I was unable to test this on prior versions because it wasn't considered a bug in prior versions.
⏯ Playground Link
https://github.com/romanstetsyk/tsbuildinfo-error
💻 Code
// tsconfig.json
{
"compilerOptions": {
"tsBuildInfoFile": "./.cache/tsconfig.tsbuildinfo"
}
}
🙁 Actual behavior
Error: Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.

🙂 Expected behavior
No error if incremental
or composite
is not specified with tsBuildInfoFile
.
According to the Typescript 5.6 announcement:
TypeScript now always emits a .tsbuildinfo file for any project in a --build invocation (even if --incremental/--composite is not specified)
Additional information about the issue
The issue goes away if tsconfig.json
is renamed to anything else, e.g. tsconfig.app.json
.
The build process with tsc --build ./tsconfig.json
is successful even though VSCode shows an error in tsconfig.json
.
The issue can't be reproduced in the TypeScript Playground because tsBuildInfoFile
can't be configured there.