Skip to content

ng update does not update deps in projects #18205

Closed
@patoncrispy

Description

@patoncrispy

🐞 bug report

Affected Package

This seems to be an issue with @angular/cli.

Is this a regression?

Not sure, first time trying to update a project!

Description

I've run through the ng update (from Angular 8.2 to Angular 9.1) process and the workspace deps were updated, but my project package.json was not updated with the new versions.

My workspace deps look like this:

  "dependencies": {
    "@angular/common": "^9.1.12",
    "@angular/compiler": "^9.1.12",
    "@angular/core": "^9.1.12",
    // ... etc.
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.901.10",
    "@angular-devkit/build-ng-packagr": "~0.901.10",
    // ... etc.
  }

while my project deps look like this:

  "peerDependencies": {
    "@angular/common": "^8.2.13",
    "@angular/core": "^8.2.13"
  },
  "devDependencies": {
    "@angular/compiler": "8.2.13",
    "@angular/platform-browser": "8.2.13",
    "@angular/platform-browser-dynamic": "8.2.13",
    // ... etc.
  }

🔬 Minimal Reproduction

I couldn't find a way of creating an Angular 8 project as ng new seems to just opt for latest. If this is incorrect, please correct me and I'll try and create a reproduction of this.

🌍 Your Environment

Angular Version:
Before upgrade:


Angular CLI: 8.3.17
Node: 12.16.1
OS: darwin x64
Angular: 8.2.13
... common, compiler, compiler-cli, core, language-service
... platform-browser, platform-browser-dynamic

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.803.17
@angular-devkit/build-angular      0.803.17
@angular-devkit/build-ng-packagr   0.803.17
@angular-devkit/build-optimizer    0.803.17
@angular-devkit/build-webpack      0.803.17
@angular-devkit/core               8.3.17
@angular-devkit/schematics         8.3.17
@angular/cli                       8.3.17
@ngtools/webpack                   8.3.17
@schematics/angular                8.3.17
@schematics/update                 0.803.17
ng-packagr                         5.7.1
rxjs                               6.4.0
typescript                         3.5.3
webpack                            4.39.2

After upgrade:


Angular CLI: 9.1.10
Node: 12.16.1
OS: darwin x64

Angular: 9.1.12
... common, compiler, compiler-cli, core, language-service
... platform-browser, platform-browser-dynamic
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.901.10
@angular-devkit/build-angular      0.901.10
@angular-devkit/build-ng-packagr   0.901.10
@angular-devkit/build-optimizer    0.901.10
@angular-devkit/build-webpack      0.901.10
@angular-devkit/core               9.1.10
@angular-devkit/schematics         9.1.10
@angular/cli                       9.1.10
@ngtools/webpack                   9.1.10
@schematics/angular                9.1.10
@schematics/update                 0.901.10
ng-packagr                         9.1.5
rxjs                               6.5.3
typescript                         3.8.3
webpack                            4.42.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions