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
- Correct the spelling, or remove an option your tsc version does not support
Pin TypeScript to a version that supports it
- Match the installed typescript to the option you need
- Install from the lockfile so CI uses that version
shell
npm i -D typescript@latest
npx tsc --versionHow 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
TS5024: Compiler option requires a value of type - in CIFix "error TS5024: Compiler option 'x' requires a value of type ..." when tsc runs in CI - a tsconfig option…
TS2792: Cannot find module - try moduleResolution node - in CIFix "error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', o…
TS2769: No overload matches this call - in CIFix "error TS2769: No overload matches this call" when tsc runs in CI - arguments do not fit any of a functio…