duluca / local-weather-app

Learn Angular, Material, RxJS fundemantals using OpenWeatherMap.org APIs

Home Page:https://angularforenterprise.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Updating to Angular 7

newschapmj1 opened this issue · comments

commented

I had Angular 7 already installed.
These steps updated the project from Angular 6
I'm new to Angular so there may be better ways of doing this.

npm install -g rxjs-tslint
rxjs-5-to-6-migrate -p src/tsconfig.app.json

ng update @angular/cli @angular/core
npm audit fix
npm audit fix --force

ng serve --got error

ERROR in node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(25,15): error TS2416: Property '_registry' in type 'MockMatchMedia' is not assignable to the same property in base type 'MatchMedia'.
Type 'Map<string, MockMediaQueryList>' is not assignable to type 'Map<string, MediaQueryList>'.
Type 'MockMediaQueryList' is not assignable to type 'MediaQueryList'.
Property 'onchange' is missing in type 'MockMediaQueryList'.
node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(63,22): error TS2420: Class 'MockMediaQueryList' incorrectly implements interface 'MediaQueryList'.
Property 'onchange' is missing in type 'MockMediaQueryList'.ERROR in node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(25,15): error TS2416: Property '_registry' in type 'MockMatchMedia' is not assignable to the same property in base type 'MatchMedia'.

This fixed the issue
ng update --all

ng serve --works successfully

@newschapmj1 you're right, rxjs5-to-6 is only relevant when upgrading from Angular 5 to 6. And I just upgraded this base project to Angular 7. Thanks for the report