Skip to content

ng update is trying to install non-stable versions  #21534

@e-oz

Description

@e-oz

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 12.1.x (before 12.2)

Description

A clear and concise description of the problem...

🔬 Minimal Reproduction

  1. get package.json with dependencies to 11.2.3, like this:
    "@angular/animations": "^11.2.3",
    "@angular/cdk": "^11.2.2",
    "@angular/common": "^11.2.3",
    "@angular/compiler": "^11.2.3",
    "@angular/core": "^11.2.3",
    "@angular/forms": "^11.2.3",
    "@angular/localize": "^11.2.3",
    "@angular/material": "^11.2.2",
...
  1. try to run ng update @angular/core

🔥 Exception or Error


The installed local Angular CLI version is older than the latest stable version.
Installing a temporary version to perform the update.
✔ Package successfully installed.
Using package manager: 'npm'
Collecting installed dependencies...
Found 77 dependencies.
Fetching dependency metadata from registry...
                  Package "@angular-devkit/build-angular" has an incompatible peer dependency to "@angular/compiler-cli" (requires "^12.0.0 || ^12.2.0-next", would install "13.0.0-next.0")
                  Package "@angular-devkit/build-angular" has an incompatible peer dependency to "@angular/localize" (requires "^12.0.0 || ^12.2.0-next", would install "13.0.0-next.0")
...

🌍 Your Environment


Angular CLI: 11.2.2
Node: 16.4.0
OS: darwin arm64

Angular: 11.2.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, platform-server, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.2
@angular-devkit/build-angular   0.1102.2
@angular-devkit/core            11.2.2
@angular-devkit/schematics      11.2.2
@angular/cdk                    11.2.2
@angular/cli                    11.2.2
@angular/material               11.2.2
@schematics/angular             11.2.2
@schematics/update              0.1102.2
rxjs                            6.6.3
typescript                      4.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions