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.
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
# 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
- Run
tsc --showConfig -p tsconfig.jsonto see the merged config and where extends resolved. - Confirm the base file is present in the CI checkout (not gitignored or in an unfetched workspace).
- 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 cithem. - Double-check relative
extendspaths in monorepos. - Use
tsc --showConfigto validate config merging.