6

I have angular CLI 7.3.0. According to the release description here, This release also involved releasing @angular-devkit/build-angular 0.13.0.

As you can see in my screenshot below, I have @angular-devkit/build-angular, @angular-devkit/architect, @angular-devkit/build-optimizer, @angular-devkit/build-webpack all at version 0.10.2.

I then do an ng update, and the CLI tells me that everything is in order. Why? Shouldn't it tell me that I need to update all of the previously mentioned packages to 0.13.0?

Or better yet, shouldn't those packages automatically update when I do an ng update @angular/cli? That is the command I did to update to CLI 7.3.0, and the @angular-devkit packages did not update enter image description here

TheParam
  • 10,113
  • 4
  • 40
  • 51

3 Answers3

9

This works for me

ng update @angular-devkit/build-angular
0

Update for Angular 16.

ng update @angular/cli updates those packages (and more)

ng update @angular/cli
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 16.1.3 to perform the update.
✔ Packages successfully installed.
Using package manager: npm
Collecting installed dependencies...
Found 93 dependencies.
Fetching dependency metadata from registry...
    Updating package.json with dependency @angular-devkit/build-angular @ "16.1.3" (was "15.1.2")...
    Updating package.json with dependency @angular/cli @ "16.1.3" (was "15.1.4")...
    Updating package.json with dependency ng-packagr @ "16.1.0" (was "15.1.1")...
    Updating package.json with dependency @angular-devkit/core @ "16.1.3" (was "15.1.2")...
    Updating package.json with dependency @angular-devkit/schematics @ "16.1.3" (was "15.1.4")...
Slaven Tomac
  • 1,552
  • 2
  • 26
  • 38
-1

use these commands.

npm uninstall -g angular-cli
npm cache clean or npm cache verify (if npm > 5)
npm install -g @angular/cli@latest
  • `ng update @angular-devkit/build-angular` worked for me. As a sidenote, I was able to successfully run this, prior: `npm update angular-cli` – TruncatedCoDr Aug 27 '22 at 18:15