- Error
- Reported by the tsconfig loader
TS5055
Cannot write file '{0}' because it would overwrite input file.
Compiling would write an output file over one of the input files, typically a .js input with allowJs. Set outDir, or exclude the file.
What it means
With allowJs, JavaScript files are inputs, and emitting next to them would replace them with their own output. The config is rejected instead. ts_r_config detects this, but ts-r-check doesn't print program-level option checks yet, so running it on such a config shows no error today.
How to fix
- Set
outDirso output goes to a separate directory. - Or set
noEmitif you only type-check. - Or exclude the JavaScript files from the project.