Repository navigation
Upgrade to Angular 22 fails without any details #33460
Description
Activity
- addedgemini-triagedLabel noting that an issue has been triaged by geminiLabel noting that an issue has been triaged by gemini
on Jun 25, 2026 Having the same issue, but on a different environment (so posting here to indicate it's likely not environment-dependent):
_ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| |___/ Angular CLI : 21.2.16 Angular : 21.2.17 Node.js : 24.11.1 Package Manager : yarn 4.17.0 Operating System : darwin arm64 ┌────────────────────────────────────┬───────────────────┬───────────────────┐ │ Package │ Installed Version │ Requested Version │ ├────────────────────────────────────┼───────────────────┼───────────────────┤ │ @angular-devkit/architect │ 0.2102.16 │ 0.2102.16 │ │ @angular-devkit/core │ 21.2.16 │ 21.2.16 │ │ @angular-devkit/schematics │ 21.2.16 │ 21.2.16 │ │ @angular/animations │ 21.2.17 │ 21.2.17 │ │ @angular/build │ 21.2.16 │ 21.2.16 │ │ @angular/cdk │ 21.2.14 │ 21.2.14 │ │ @angular/cli │ 21.2.16 │ 21.2.16 │ │ @angular/common │ 21.2.17 │ 21.2.17 │ │ @angular/compiler │ 21.2.17 │ 21.2.17 │ │ @angular/compiler-cli │ 21.2.17 │ 21.2.17 │ │ @angular/core │ 21.2.17 │ 21.2.17 │ │ @angular/forms │ 21.2.17 │ 21.2.17 │ │ @angular/language-service │ 21.2.17 │ 21.2.17 │ │ @angular/material │ 21.2.14 │ 21.2.14 │ │ @angular/material-date-fns-adapter │ 21.2.14 │ 21.2.14 │ │ @angular/platform-browser │ 21.2.17 │ 21.2.17 │ │ @angular/platform-browser-dynamic │ 21.2.17 │ 21.2.17 │ │ @angular/router │ 21.2.17 │ 21.2.17 │ │ rxjs │ 7.8.2 │ 7.8.2 │ │ typescript │ 5.9.3 │ 5.9.3 │ │ zone.js │ 0.16.2 │ 0.16.2 │ └────────────────────────────────────┴───────────────────┴───────────────────┘- addedneeds: repro stepsWe cannot reproduce the issue with the information givenWe cannot reproduce the issue with the information given
on Jun 25, 2026 I am unable to replicate this based on the reproduction provided.
$ ng update @angular/core@22 @angular/cli@22 The installed Angular CLI version is outdated. Installing a temporary Angular CLI versioned 22.0.4 to perform the update. Using package manager: npm Collecting installed dependencies... Found 18 dependencies. Fetching dependency metadata from registry... Updating package.json with dependency @angular/build @ "22.0.4" (was "21.2.13")... Updating package.json with dependency @angular/cli @ "22.0.4" (was "21.2.13")... Updating package.json with dependency @angular/compiler-cli @ "22.0.2" (was "21.2.15")... Updating package.json with dependency @angular/localize @ "22.0.2" (was "21.2.15")... Updating package.json with dependency typescript @ "6.0.3" (was "5.9.3")... Updating package.json with dependency @angular/common @ "22.0.2" (was "21.2.15")... Updating package.json with dependency @angular/compiler @ "22.0.2" (was "21.2.15")... Updating package.json with dependency @angular/core @ "22.0.2" (was "21.2.15")... Updating package.json with dependency @angular/forms @ "22.0.2" (was "21.2.15")... Updating package.json with dependency @angular/platform-browser @ "22.0.2" (was "21.2.15")... Updating package.json with dependency @angular/router @ "22.0.2" (was "21.2.15")... UPDATE package.json (752 bytes) ✔ Cleaning node modules directory ⠋ Installing packagesWhat is failing in this instance is the package manager invocation.
Is there any option I can enable locally to get more info about why the package manager invocation fails? Because NPM by itself works fine. I tried the
--verboseflag on ng update, but that did not give any additional info in the log.Additionally, is there any way to just skip the whole "Installing a temporary Angular CLI versioned 22.0.4 to perform the update."?
I've been trying to work around that using
npx @angular/cli@22 update @angular/core@22 @angular/cli@22unfortunately to no avail.
The installed Angular CLI version is outdated. Installing a temporary Angular CLI versioned 22.0.4 to perform the update. An unhandled exception occurred: Process exited with code 1. See "/private/.../angular-errors.log" for further details.To bypass the version check, use the
NG_DISABLE_VERSION_CHECK=1environment variable.Reacted by jimivdwI think I figured it out on my machine: the IT department has pushed a global environment variable
npm_config_min_release_age=3to all developer machines (as a mitigation for NPM supply-chain attacks). The CLI tries to install the latest version, but it's newer than (today - 3 days), so NPM refuses to install it.If I disable the version check, the upgrade fails at a later step, when the latest packages are installed. Those also fail, because e.g.
@angular/build@22.0.4does not satisfy that constraint:npm error notarget No matching version found for @angular/build@22.0.4 with a date before 22.6.2026, 15:03:39If I set that env var to 0, I can install the packages and the update command runs fine.
Then the next question is: how can the Angular CLI deal with this to support developers?
- Should it warn developers that this setting may cause such failures?
- Should it comply with such a setting and only install packages (both for the temporary CLI and any actual package upgrades) that satisfy such a min-age constraint?
I have searched the issue tracker with this new knowledge and found #33119. The fix for that issue should land in Angular 22.1.
@mm-jhn, correct the issue you are experiencing has been resolved in version 22.1, which is currently in pre-release.
You can try updating to the pre-release version by running the following command to see if it fixes the behavior:
ng update @angular/core@22 @angular/cli@22 --nextI'm afraid it doesn't:
PS D:\angular-repro> ng update @angular/core@22 @angular/cli@22 --next The installed Angular CLI version is outdated. Installing a temporary Angular CLI versioned 22.1.0-next.1 to perform the update. An unhandled exception occurred: Process exited with code 1. See "C:\Users\username\AppData\Local\Temp\ng-Qmw1LH\angular-errors.log" for further details.Ah, right. to consume this fix the local CLI also need to be updated.
Closing this issue as it has already been addressed. In the meantime, you can use
NG_DISABLE_VERSION_CHECK=1as a temporary workaround.Reacted by jimivdwangular-automatic-lock-bot commented
on Jul 26, 2026 More actionsThis 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.
- locked and limited conversation to collaborators
on Jul 26, 2026
Command
update
Is this a regression?
The previous version in which this bug was not present was
No response
Description
I am trying to upgrade our Angular 21 app to Angular 22. But the process fails pretty much immediately with an unhelpful error message that does not point to any particular reason and I don't know how to investigate further.
Minimal Reproduction
Run the following command in this repo: https://github.com/mm-jhn/ng22-repro
ng update @angular/core@22 @angular/cli@22(the first step from https://angular.dev/update-guide?v=21.0-22.0&l=2)
Exception or Error
Your Environment
Anything else relevant?
No response