Skip to content
Latchkey

TS5023: Unknown compiler option - in CI

tsc does not recognize a compilerOptions key, usually a typo or an option requiring a newer TypeScript than CI has.

What this error means

tsc fails at config load with TS5023 naming the unrecognized option, before any type-checking runs.

tsc
error TS5023: Unknown compiler option 'verbatimModuleSyntax'.

Common causes

How to fix it

Fix or remove the option

  1. Correct the spelling, or remove an option your tsc version does not support

Pin TypeScript to a version that supports it

  1. Match the installed typescript to the option you need
  2. Install from the lockfile so CI uses that version
shell
npm i -D typescript@latest
npx tsc --version

How to prevent it

  • Pin TypeScript in devDependencies and keep tsconfig options within that version's supported set.

Frequently asked questions

What causes "TS5023 unknown compiler option"?
tsc fails at config load with TS5023 naming the unrecognized option, before any type-checking runs.
How do I fix TS5023 unknown compiler option?
Fix or remove the option

Related guides

References

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