Skip to content

minimum-release-age prevents ng update #33119

@BePo65

Description

@BePo65

Issue #31232 proposed minimumReleaseAge (or min-release-age) as a feature for ng update. As it did not get enough upvotes to bring this idea to the backlog.

But using minimumReleaseAge create a real problem, when trying to update angular.

What I have
a small project with angular@21.2.8 (esday-demo-angular).

min-release-age=7 in .npmrc

What I did

ng update @angular/core@^21 @angular/cli@^21

What I got

The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 21.2.9 to perform the update.
An unhandled exception occurred: Process exited with code 1.
See "C:\Users\Berni\AppData\Local\Temp\ng-mGkIxv\angular-errors.log" for further details.

The content of the logfile:

[error] Error: Process exited with code 1.
    at ChildProcess.<anonymous> (D:\Projekte\github\esday-demo-angular\node_modules\@angular\cli\src\package-managers\host.js:65:28)
    at ChildProcess.emit (node:events:509:28)
    at maybeClose (node:internal/child_process:1124:16)
    at ChildProcess._handle.onexit (node:internal/child_process:306:5)

my interpretation of what happended

  1. ng update looks for the latest available version of @angular/cli in npmjs
  2. ng finds v21.2.9
  3. ng tries to install this version as a temporary version
  4. npm (or any other package manager) prevents the installation of @angular/cli@21.2.9 as this version was published only 2 days ago (today is 2026-05-02).
  5. ng updates emits the error An unhandled exception occurred

So to me it looks like ng update cannot simply ignore the setting min-release-age of the used package manager (or how this option is named in the different package mangers - e.g. pnpm uses "minimumReleaseAge").

IMHO this concerns also the last comments in issue #31232 (e.g. by @mattharr in #31232

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