Skip to content
Latchkey

TypeScript "TS18003: No inputs were found in config file"

tsc resolved your tsconfig.json but its include/files/exclude globs matched zero source files. The compiler has nothing to compile, so it errors out instead of silently doing nothing.

What this error means

tsc fails with error TS18003: No inputs were found in config file '<path>', echoing the include/exclude patterns. It often appears when running from the wrong directory or against a partial checkout.

tsc output
error TS18003: No inputs were found in config file '/app/tsconfig.json'.
Specified 'include' paths were '["src/**/*"]' and 'exclude' paths were
'["node_modules","dist"]'.

Common causes

include/files match no files

The include glob points at a directory that does not exist or is empty (e.g. src/ when sources live in lib/), or exclude removes everything that include matched.

Wrong working directory or partial checkout

Running tsc from the wrong cwd, or a sparse/shallow checkout that omits the source directory, leaves the configured paths empty in CI.

How to fix it

Point include at real source paths

Make the globs match where your code actually lives.

tsconfig.json
// tsconfig.json
{
  "include": ["src/**/*.ts", "src/**/*.tsx"],
  "exclude": ["node_modules", "dist"]
}

Run from the right directory with the right config

  1. Confirm cwd: tsc -p ./tsconfig.json from the project root.
  2. Check the checkout actually contains the source directory in CI.
  3. List what tsc sees with tsc --listFilesOnly -p tsconfig.json.

How to prevent it

  • Keep include aligned with your real source layout.
  • Run tsc from a consistent working directory in CI.
  • Ensure the checkout includes all source paths the config references.

Related guides

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