Unable to execute ng g @angular/core:control-flow on V20
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
Tried executing ng generate @angular/core:control-flow on angular CLI and i get the error
Schematic "control-flow" not found in collection "@angular/core".
Tried on newly created v20 project and even updating older from v19 to v20
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Schematic "control-flow" not found in collection "@angular/core".
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 20.0.0
Node: 22.2.0
Package Manager: npm 10.7.0
OS: win32 x64
Angular: 20.0.0
... build, cli, common, compiler, compiler-cli, core, forms
... platform-browser, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.2000.0
@angular-devkit/core 20.0.0
@angular-devkit/schematics 20.0.0
@schematics/angular 20.0.0
rxjs 7.8.2
typescript 5.8.3
zone.js 0.15.1
Anything else?
No response
On checking i found , schematic was moved from collections.json to migration.json in core but with optional flag true and now when use wants to execute this on later stage it wont be possible Changes were done in https://github.com/angular/angular/pull/60492
Solution i would suggest is keep it in collections.json as well so this can be executed on CLI on later stage also
The control flow migration schematic can be re-run with ng update @angular/core --migrate-only --from=19 --to=20
The temporary CLI v20 which is installed for previous versions cannot find the new name
> ng update @angular/core --name=control-flow-migration
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 20.0.0 to perform the update.
Using package manager: npm
Collecting installed dependencies...
Found 89 dependencies.
Cannot find migration 'control-flow-migration' in '@angular/core'.
Repro https://stackblitz.com/edit/stackblitz-starters-dpwe5a2h?file=src%2Fmain.ts
ng update @angular/core --name=control-flow-migration can only be run on a v20 project.
This is to re-run the schematics on a project that has already been updated to v20.
Also with #61773 we intend to bring back the previous ng generate schematics.
We can close this Issue PR got merged.
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.