Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 9 to 10 upgrade - Typescript compilation warnings : *.ngtypecheck.ts

Post my upgrade from Angular 9 to Angular 10. ng build --prod throws the Typescript compilation unused warnings:

.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig.

I have tried all solutions like removing the following include directive from tsconfig.app.json:

    "include": [
    "src/**/*.d.ts"
]

The only workaround that works is setting Ivy to False. But I do not wish to do that and instead want to find the real solution. I did not face it during my upgrade from Angular 8 to 9. Don't know why am bombarded with these warnings when upgrading to 10. Kindly help.

like image 403
Mbk Avatar asked Oct 16 '22 01:10

Mbk


1 Answers

A long story short I noticed the the problem arose for people with custom web kit settings.
So I
ng update @angular-devkit/build-angular
and the warnings disappeared.

To be honest, I aimed for updating @ngtools/webpack but copied the wrong text and by serendipity it solved my problem. (for now...)

like image 164
LosManos Avatar answered Oct 19 '22 00:10

LosManos