I just updated my angular version from 9 to 10.
I followed the below steps to do so. As per the Angular Update Guide
Step 1:
ng update @angular/core @angular/cli
Step 2: Since I am using angular material. I updated the angular material as well.
ng update @angular/material
Step 3: Last step.
ng update
My package.json file
{
"name": "my-app-name",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~10.0.12",
"@angular/cdk": "^10.1.3",
"@angular/common": "~10.0.12",
"@angular/compiler": "~10.0.12",
"@angular/core": "~10.0.12",
"@angular/flex-layout": "^10.0.0-beta.32",
"@angular/forms": "~10.0.12",
"@angular/material": "^10.1.3",
"@angular/platform-browser": "~10.0.12",
"@angular/platform-browser-dynamic": "~10.0.12",
"@angular/router": "~10.0.12",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.7",
"@angular/cli": "^10.0.7",
"@angular/compiler-cli": "~10.0.12",
"@angular/language-service": "~10.0.12",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.3",
"ts-node": "~8.3.0",
"tslint": "~5.18.0",
"typescript": "~3.9.7"
}
}
My Angular version
Angular CLI: 10.0.7
Node: 12.18.3
OS: win32 x64
Angular: 10.0.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: <error>
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.900.7
@angular-devkit/build-angular 0.900.7
@angular-devkit/build-optimizer 0.900.7
@angular-devkit/build-webpack 0.900.7
@angular-devkit/core 9.0.7
@angular-devkit/schematics 10.0.7
@angular/cdk 10.1.3
@angular/cli 10.0.7
@angular/flex-layout 10.0.0-beta.32
@angular/material 10.1.3
@ngtools/webpack 9.0.7
@schematics/angular 10.0.7
@schematics/update 0.1000.7
rxjs 6.5.5
typescript 3.9.7
webpack 4.41.2
I got too many warnings like mentioned below.
WARNING in __local_path__file_name..ngtypecheck.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig.
Also, tsconfig.app.json file as mentioned below
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"]
}
I tried several solutions. But nothing worked for me.
Thanks in advance.