1

I have updated Angular using ng update @angular/cli but am now receiving errors. Below is the output of running ng --version:

Angular CLI: 8.1.0
Node: 10.16.0
OS: darwin x64
Angular: 
... 


Package                      Version
------------------------------------------------------
@angular-devkit/architect    <error>
@angular-devkit/core         <error>
@angular-devkit/schematics   <error>
@schematics/angular          <error>
@schematics/update           <error>

I have tried to uninstall node and angular, but am still encountering the issues.

How do I revert what I did so I do not have the errors anymore, and then what is the correct way to upgrade to Angular version 8? Thank you.

5
  • npm uninstall -g @angular/cli doesn't update angular. It uninstalls the Angular CLI. Commented Jul 7, 2019 at 11:46
  • @JBNizet Then what should i do to fix this Commented Jul 7, 2019 at 11:47
  • What are you trying to do? Commented Jul 7, 2019 at 11:47
  • I wanted to update Angular version to 8. Then I tried ng update @angular/cli command. Commented Jul 7, 2019 at 11:48
  • 1
    Don't try random things. Follow the instructions here: update.angular.io. And note that you must be inside an Angular project to update it to a given Angular version. Commented Jul 7, 2019 at 11:50

1 Answer 1

2

Since you already uninstalled some packages, you may want to get back to where you were before first. So start with a clean slate.

  1. In your terminal go to the angular project you are trying to update
  2. Remove your node_modues
    • $ rm -rf node_modules
  3. Reinstall your current packages based on package-lock.json to be at the correct state
    • $ npm ci
  4. Now you can again view what packages need updating
    • $ ng update
  5. Update Angular CLI and core together as per Angular's update guide
    • $ ng update @angular/cli @angular/core
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.