I used the following process
Actually, a thing to note is when I created my Angular project, it created a git repository. As I reflect back upon the process, I had to do a lot of commit’s. Thinking about it, maybe each of those npm update commands require your code to be commited first. I think that’s a good idea. I lost nothing, but if I did, it would be in my repository.
If you dont commit, you receive ‘Repository is not clean, please commit or stash any changes before updating’. Here is a sample command.
1 | git commit -m "code before angular update" |
1 | npm update @angular/cli @angular/core |
I also performed a typescript update.
References
- https://blog.angular.io/version-9-1-of-angular-now-available-typescript-3-8-faster-builds-and-more-eb292f989428
- https://stackoverflow.com/questions/56773528/repository-is-not-clean-please-commit-or-stash-any-changes-before-updating-in-a - discusses how you need to commit your code before certain update methods work.