Compiling an angular application (v10) fails with this error.
An unhandled exception occurred: tsconfig.json:14:5 - error TS5023: Unknown compiler option 'strictTemplates'.
14 "strictTemplates": true,
~~~~~~~~~~~~~~~~~
error TS5023:Build:Unknown compiler option ‘listemittedfiles’. Apparently, the problem was related to a strange option switch used by the Visual Studio 2015’s MSBuild task: , which has been introduced in TypeScript 2.0 and shouldn’t be used with earlier versions of TypeScript such as the one he was using to compile my project, which was 1.7.5.
An unhandled exception occurred: tsconfig.json:14:5 - error TS5023: Unknown compiler option 'strictTemplates'. 14 "strictTemplates": true, ~~~~~~~~~~~~~~~~~ strictTemplates is a parameter for the angular compiler. In your tsconfig.json: move the parameter inside angularCompilerOptions
error TS5023:Build:Unknown compiler option ‘listemittedfiles’. Apparently, the problem was related to a strange option switch used by the Visual Studio 2015’s MSBuild task:
When strictTemplates is true, Angular 9 and the Ivy compiler verify that hero is a valid model of type Hero, and that the properties on that model ( hero. id and hero. name) are also valid. "Angular 9's Ivy compiler and the strict template check finds errors that Angular 8 could not detect." Should We Use Strict Templates Now?
strictTemplates
is a parameter for the angular compiler.
In your tsconfig.json: move the parameter inside angularCompilerOptions
"angularCompilerOptions": {
...,
"strictTemplates": true,
...
}
Angular >= 9 is necessary.
More info here: https://angular.io/guide/template-typecheck
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With