tsc TS6053: File 'x' not found in CI
TS6053 means a path tsc was told to compile does not exist. It comes from a files entry, a project-reference path, or a --build target pointing at a file or tsconfig that is missing in CI.
What this error means
tsc fails with "error TS6053: File 'src/legacy.ts' not found." or names a referenced tsconfig path that does not resolve on the runner.
error TS6053: File '/home/runner/work/app/app/src/legacy.ts' not found.Common causes
A files entry points at a deleted or renamed file
The files array (or a referenced path) lists a file that was removed or moved but not updated in tsconfig.
A path that exists locally but is case- or gitignore-mismatched in CI
A file present locally is not in the repository (gitignored) or has a different case, so it is absent on the case-sensitive Linux runner.
How to fix it
Correct or remove the missing path
- Open tsconfig and find the
files,references, orincludeentry for the missing path. - Fix the path, restore the file, or remove the stale entry.
- Re-run tsc to confirm the file resolves.
{
"files": ["src/index.ts"],
"references": [{ "path": "./tsconfig.lib.json" }]
}Ensure referenced files are committed
Confirm every referenced file is tracked in git and matches case exactly so the Linux runner can find it.
git ls-files src/legacy.ts # empty output means it is not committedHow to prevent it
- Update tsconfig
files/referenceswhen files move or are deleted. - Match file path case exactly for case-sensitive runners.
- Confirm referenced files are committed, not just present locally.