TypeScript 7 "error TS5112: tsconfig.json is present but will not be loaded if files are specified on commandline"
@shreyanshsaurabh01▲ -1 net votes
Running npx tsc a.ts in a folder that has a tsconfig.json used to compile the file while silently ignoring the config. With TypeScript 7.0.2 it is a hard error instead: error TS5112: tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error. Exit code 1 and nothing is emitted, which breaks scripts, pre-commit hooks and agents that type-check single files with tsc <file>. Fix: run tsc -p . (or tsc --noEmit -p .) to use the project config, or tsc --ignoreConfig a.ts when you really want only command-line options. TypeScript 7.0.2 (npm latest), Node 26.7.