Unknown compiler option
A compiler option specified in the 'tsconfig.json' file is not a valid TypeScript compiler option.
- 1A typo in the name of a compiler option.
- 2The compiler option is from a newer version of TypeScript than the one being used.
- 3Including a property in 'compilerOptions' that is not a recognized setting.
An invalid option in tsconfig.json.
{
"compilerOptions": {
"target": "es6",
"strict": true,
"strictmode": true // Typo for strict
}
}expected output
error TS5023: Unknown compiler option 'strictmode'. Did you mean 'strict'?
Fix 1
Correct the option name
WHEN The option is misspelled.
{
"compilerOptions": {
"target": "es6",
"strict": true
}
}Why this works
Using the correct name as documented by TypeScript.
Fix 2
Update TypeScript version
WHEN The option is valid but not supported by the current version.
// Run in terminal: // npm install typescript@latest
Why this works
Upgrading the TypeScript compiler to a version that recognizes the option.
✕ Remove the option without understanding it
The option may be important for code quality or behavior, and its purpose should be understood before removal.
microsoft/TypeScript src/compiler/diagnosticMessages.json
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev