Skip to content
Latchkey

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.

tsc
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

  1. Open tsconfig and find the files, references, or include entry for the missing path.
  2. Fix the path, restore the file, or remove the stale entry.
  3. Re-run tsc to confirm the file resolves.
tsconfig.json
{
  "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.

Terminal
git ls-files src/legacy.ts   # empty output means it is not committed

How to prevent it

  • Update tsconfig files/references when files move or are deleted.
  • Match file path case exactly for case-sensitive runners.
  • Confirm referenced files are committed, not just present locally.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →