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"]'.

Diagnose it: which tsconfig and which compiler?

A TypeScript error that appears only in CI usually means the runner is compiling with a different config or a different compiler version than your editor. Your editor uses the workspace TypeScript and the nearest tsconfig.json; CI uses whatever the lockfile resolved and whatever config the build script names.

Terminal
# what CI will actually use
npx tsc --version
npx tsc --showConfig | head -40

# which files are in the program (a missing include is a common cause)
npx tsc --listFiles | wc -l

# type-check only, no emit, same as most CI gates
npx tsc --noEmit

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.

Pin the compiler so unrelated updates cannot break the gate

TypeScript adds errors in minor releases. An unpinned compiler turns a routine dependency update into a red build on code nobody touched, which is the most common false alarm in a TypeScript CI pipeline.

package.json
// package.json
{
  "devDependencies": {
    "typescript": "5.6.3"   // exact, not ^5.6.3
  }
}

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.

Frequently asked questions

What causes TypeScript "TS18003: no inputs were found in config file"?
There are 2 common causes: include/files match no files and wrong working directory or partial checkout. The include glob points at a directory that does not exist or is empty (e.g.
How do I fix TypeScript "TS18003: no inputs were found in config file"?
There are 2 fixes depending on which cause you have: point include at real source paths and run from the right directory with the right config. Work through them in order, since the first is the most common.
What does TypeScript "TS18003: no inputs were found in config file" actually mean?
tsc fails with error TS18003: No inputs were found in config file '<path>', echoing the include/exclude patterns.
How do I stop TypeScript "TS18003: no inputs were found in config file" happening again?
Keep include aligned with your real source layout. The prevention section lists 3 changes that keep it from recurring.

Related guides

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card