Skip to content
Latchkey

TypeScript "TS5083: Cannot read file tsconfig" - extends Errors

Your tsconfig extends a base config that tsc cannot read. The path is wrong, the file is missing from the checkout, or the shared config package (@tsconfig/*, a workspace base) was never installed.

What this error means

tsc fails at config resolution with error TS5083: Cannot read file '<path>', naming the base config from extends. It happens before compilation and is consistent.

tsc output
error TS5083: Cannot read file '/app/packages/web/../../tsconfig.base.json'.
# or, a shared package not installed:
error TS5083: Cannot read file '@tsconfig/strictest/tsconfig.json'.

Common causes

Wrong relative extends path

The extends path is relative to the current tsconfig. In a monorepo it is easy to point one level too high or low, so the base file is not where tsc looks.

Shared config package not installed

Extending a published base (@tsconfig/node20, an internal shared-config package) requires that package in node_modules. A clean CI install without it fails to read the file.

How to fix it

Fix the extends path or install the base package

Terminal
# install a shared base config package
npm install -D @tsconfig/strictest
# or correct a relative path in tsconfig.json:
# "extends": "../../tsconfig.base.json"

Verify resolution in CI

  1. Run tsc --showConfig -p tsconfig.json to see the merged config and where extends resolved.
  2. Confirm the base file is present in the CI checkout (not gitignored or in an unfetched workspace).
  3. In monorepos, ensure the workspace providing the base config is installed before type-check.

How to prevent it

  • Install shared tsconfig packages as dev dependencies and npm ci them.
  • Double-check relative extends paths in monorepos.
  • Use tsc --showConfig to validate config merging.

Frequently asked questions

What causes ""Cannot read tsconfig""?
The extends path is relative to the current tsconfig. In a monorepo it is easy to point one level too high or low, so the base file is not where tsc looks.
How do I fix "Cannot read tsconfig"?
Fix the extends path or install the base package

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card