10

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

4 Answers 4

12

This works for me

ng update @angular-devkit/build-angular 
Sign up to request clarification or add additional context in comments.

Comments

1

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")... 

Comments

0

Depending on how far back you are, you might have to step each Angular and CLI up by one, from the version one is at. For example, mine is at 16 and I need to go at 19. Then I update each cli such as

ng update @angular/cli@17

then

ng update @angular/cli@18

then

ng update @angular/cli@19

Note, you might have to also update version control with each of changes as you step through.

Comments

-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 

1 Comment

ng update @angular-devkit/build-angular worked for me. As a sidenote, I was able to successfully run this, prior: npm update angular-cli

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.