loading...
Cover image for Getting Started with Angular 9

Getting Started with Angular 9

jwp profile image John Peters Updated on ・1 min read

We were working on the Angular 8 platform and did this to upgrade all Angular dependencies (global and local) to Angular 9.

The first thing to do is to create a new Angular project. Then look at the package.json file just created.


 "devDependencies": {
    "@angular-devkit/build-angular": "~0.803.25",
    "@angular/cli": "~8.3.25",
    "@angular/compiler-cli": "~8.2.14",

Does it look like that? If so good. You are running Angular version 8.

Now type in ng update

Dev Dependencies

After the update, you should see this:

"devDependencies": {
    "@angular-devkit/build-angular": "~0.900.5",
    "@angular/cli": "^9.0.5",
    "@angular/compiler-cli": "~9.0.5",
    "@angular/language-service": "~9.0.5",

If you don't then run

  • ng update @angular/cli @angular/core* (again)

This should update the dev dependencies, but it didn't work for us.

We then tried this:

  • npm install @angular/cli@latest --save-dev
  • npm install @angular/core@latest --save-dev

The upgrade was not totally clean as many warnings were shown. We just ignored them all.

Then type in ng serve and you should see this!

Alt Text

If you are still having issues, look at the package.json file and see if the angular and material stuff is showing the same versions. Then type in ng --version to see the global versions. (Repeat the steps above until it works).

Posted on by:

jwp profile

John Peters

@jwp

Lit-Html or Svelte?

Discussion

pic
Editor guide