migration angular 8 to 9

93 views Asked by At

while migration from angular 8 to 9, i installed angular dependecies one by one using npm i (@angular/core, @angular/cli @angular/material ect ...)

reading the documentation using ng update must fix all import

enter image description here

i'm runing ng update @angular/material@9

as result i got Package '@angular/material' is already up to date.

but no imports is fixed, how can i fix all imports

1

There are 1 answers

0
Grogu On

Check your package.json, if it's already with angular material 9, update won't do anything as you already are in the same version. Rollback to angular 8 and follow the migrations steps. You're supposed to use ng update command, not npm commands. This ensures migration scripts are launched and angular handles itself its own bloat of dependences.

Note that for more recent angular versions, commands are ng update @angular/core@11 @angular/cli@11 and ng update @angular/material@11

So if simple ng update is not working, maybe you're supposed to launch ng update @angular/core@9 @angular/cli@9 and ng update @angular/material@9