TS5024: Compiler option requires a value of type - in CI
A compilerOptions value has the wrong type - for example a string where a boolean is expected.
What this error means
tsc fails at config load with TS5024 naming the option and the value type it requires.
tsc
error TS5024: Compiler option 'strict' requires a value of type boolean.Common causes
How to fix it
Use the correct value type
- Set the option to the type tsc reports (boolean, string, array)
tsconfig.json
{
"compilerOptions": { "strict": true }
}Validate the tsconfig shape
- Check the option in the TS compiler-options reference for its expected type
How to prevent it
- Edit tsconfig with editor schema validation so wrong value types are caught before CI.
Frequently asked questions
What causes "TS5024 option needs a value"?
tsc fails at config load with TS5024 naming the option and the value type it requires.
How do I fix TS5024 option needs a value?
Use the correct value type
Related guides
TS5023: Unknown compiler option - in CIFix "error TS5023: Unknown compiler option 'x'" when tsc runs in CI - a typo, a removed option, or an option…
TS5083: Cannot read file tsconfig.json - in CIFix "error TS5083: Cannot read file 'tsconfig.json'" when tsc runs in CI - a missing config path, a bad exten…
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…