Skip to content

minimum-release-age prevents ng update #33119

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

Activity

  1. BePo65 commented on May 2, 2026

    @BePo65
    Author

    Just an addendum:

    Even trying to "outsmart" ng update by using ng update @angular/core@^21.2.8 @angular/cli@^21.2.8
    returned the same result:

    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-oZcrpN\angular-errors.log" for further details.
    
  2. BePo65 commented on May 2, 2026

    @BePo65
    Author

    I suppose that you noticed that issue #31232 described a new feature, while this issue describes a real bug?!

  3. JeanMeche commented on May 2, 2026

    @JeanMeche
    Member

    Yeah I got confused, the last comments refered to the same issue as you did.

  4. BePo65 commented on May 2, 2026

    @BePo65
    Author

    Sorry for that.

    Just another addendum (😄):
    the described problem prevents that ng update can be used in the period after publishing a new version and the time defined in minimumReleaseAge. If new versions came to fast, ng update could not be used at all any more (ok that is a very hypothetical scenario).

  5. chronoB commented on May 14, 2026

    @chronoB

    The same issue is occuring when using ng add. Example:

    .npmrc

    min-release-age=1
    > ng add angular-eslint
    ✔ Determining Package Manager
      › Using package manager: npm
    ✔ Searching for compatible package version
      › Found compatible package version: 21.4.0.
    ✔ Loading package information
    ✔ Confirming installation
    ✖ Package installation failed: Process exited with code 1.
      Output: npm error code ETARGET
      npm error notarget No matching version found for angular-eslint@^21.4.0 with a date before
       5/13/2026, 1:49:29 PM.
      npm error notarget In most cases you or one of your dependencies are requesting a package
      version that doesn't exist.
      npm error A complete log of this run can be found in:
      /home/chronob/.npm/_logs/2026-05-14T11_49_29_886Z-debug-0.log

    angular-eslint v21.4.0 was released less than one day ago so npm can't install it but the ng add command finds it.

  6. Cynaeon commented on Jun 3, 2026

    @Cynaeon

    Same thing happens with yarn and its npmMinimalAgeGate, looks like it's the same exact error too. But I guess this issue and the linked PR will only concern installation with npm?😕

  7. angular-automatic-lock-bot commented on Jul 18, 2026

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  8. locked and limited conversation to collaborators on Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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