Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Angular 19 LTS #29028

Closed
nakash2050 opened this issue Nov 21, 2024 · 16 comments · Fixed by #28847
Closed

Support for Angular 19 LTS #29028

nakash2050 opened this issue Nov 21, 2024 · 16 comments · Fixed by #28847
Assignees
Labels
scope: angular Issues related to Angular support in Nx type: feature

Comments

@nakash2050
Copy link

Discussed in #29013

Originally posted by MGREMY November 20, 2024
I could be great to have support for the new angular version
image

@kbrilla
Copy link

kbrilla commented Nov 21, 2024

Already in progress: #28847

@leosvelperez leosvelperez closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
@leosvelperez leosvelperez reopened this Nov 22, 2024
@leosvelperez leosvelperez self-assigned this Nov 22, 2024
@leosvelperez leosvelperez added type: feature scope: angular Issues related to Angular support in Nx labels Nov 22, 2024
@colinscz
Copy link

@leosvelperez quick question regarding your PR
Will migrations to the new syntax also be included or will you provide some NX generators/commands/schematics which are optional so people could migrate their code.

The migration schematics/commands I am referring to are those:

  • ng g @angular/core:control-flow (For the new template syntax control flow)
  • ng update @angular/cli --name use-application-builder (If I recall there is already an nx migration build executor present, I guess it's this one here: https://nx.dev/nx-api/angular/executors/browser-esbuild)
  • ng g @angular/core:inject-migration

@leosvelperez
Copy link
Member

hey @colinscz!

The @angular/core:control-flow and @angular/core:inject-migration can be run with Nx like any other schematics (nx g ...). If you find issues running them on an Nx workspace, please file a separate issue so we can review it and see if the Angular team can make it more generic or if it requires us to provide a similar generator to compensate.

We provide the @nx/angular:convert-to-application-executor generator to do the same operations as the use-application-builder optional migration from the Angular CLI does.

@colinscz
Copy link

hey @leosvelperez
Thank you for the explanation. In the end I found the right command to execute the control-flow migration.
npx nx generate @angular/core:control-flow-migration

If I run into any issue with the migration I'll file a new one separate from this. :)

@tejasv-tagline
Copy link

Isn't angular 19 support available yet? Many users are waiting for that, can someone please look at the PR?

@BenSawary
Copy link

Big Thanks, for the ng 19 support. However, my first installation fails on the npm peer deps check. The @nx/angular module still refers to the version of @angular-devkit/build-angular@">= 16.0.0 < 19.0.0

@leosvelperez
Copy link
Member

Big Thanks, for the ng 19 support. However, my first installation fails on the npm peer deps check. The @nx/angular module still refers to the version of @angular-devkit/build-angular@">= 16.0.0 < 19.0.0

This will be addressed soon, alongside an extra migration that's also missing. The Nx v20.2.0 will contain the right peer dependencies.

@marc-wilson
Copy link

Big Thanks, for the ng 19 support. However, my first installation fails on the npm peer deps check. The @nx/angular module still refers to the version of @angular-devkit/build-angular@">= 16.0.0 < 19.0.0

This will be addressed soon, alongside an extra migration that's also missing. The Nx v20.2.0 will contain the right peer dependencies.

Do you have a target date for nx v20.2.0?

@amazing4u
Copy link

Version 20.2.0 is published now

@GlaucoGodoi
Copy link

I still facing issues with the migrate command:

code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @w8/source@0.0.1
npm error Found: @angular-devkit/build-angular@18.2.11
npm error node_modules/@angular-devkit/build-angular
npm error dev @angular-devkit/build-angular@"19.0.4" from the root project
npm error peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/angular@20.0.6
npm error node_modules/@nx/angular
npm error dev @nx/angular@"20.2.1" from the root project
npm error 1 more (jest-preset-angular)
npm error
npm error Could not resolve dependency:
npm error dev @angular-devkit/build-angular@"19.0.4" from the root project
npm error
npm error Conflicting peer dependency: @angular/compiler-cli@19.0.3
npm error node_modules/@angular/compiler-cli
npm error peer @angular/compiler-cli@"^19.0.0" from @angular-devkit/build-angular@19.0.4
npm error node_modules/@angular-devkit/build-angular
npm error dev @angular-devkit/build-angular@"19.0.4" from the root project

Any suggestion on how to avoid or fix it?

@dales
Copy link

dales commented Dec 8, 2024

Same is happening with me

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @my-app/source@1.2.5
npm error Found: @angular-devkit/build-angular@18.2.4
npm error node_modules/@angular-devkit/build-angular
npm error   dev @angular-devkit/build-angular@"19.0.4" from the root project
npm error   peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/angular@20.1.3
npm error   node_modules/@nx/angular
npm error     dev @nx/angular@"20.2.1" from the root project
npm error   1 more (jest-preset-angular)
npm error
npm error Could not resolve dependency:
npm error dev @angular-devkit/build-angular@"19.0.4" from the root project
npm error
npm error Conflicting peer dependency: @angular/compiler-cli@19.0.3
npm error node_modules/@angular/compiler-cli
npm error   peer @angular/compiler-cli@"^19.0.0" from @angular-devkit/build-angular@19.0.4
npm error   node_modules/@angular-devkit/build-angular
npm error     dev @angular-devkit/build-angular@"19.0.4" from the root project

@BDominik
Copy link

I cannot install packages after running nx migrate latest
Image
Is manually fixing this is the only option?

@BDominik
Copy link

Is there any progress on this topic?

@FabianGosebrink
Copy link
Contributor

I did update Angular in the Nx workspace semi-automatically by using npx nx migrate @angular/core@latest and npx nx migrate @angular/cli@latest like described here #17100 (comment)

@BDominik
Copy link

BDominik commented Dec 22, 2024

Thanks for the info.
As soon as I run the first command and then npm i I got this error.
Image
I've tried lot of different way to upgrade it, but always ended up with this dependency hell.

@BDominik
Copy link

So for me the solution was to remove ngrx/signals and @angular-architects/ngrx-toolkit from package json.
then npm i was working with the updated versions.
After then I installed back ngrx/signals, but @angular-architects/ngrx-toolkit still can't install.
Also noticed that one of my signal featureStore is broken, where I import computed into from the parent signal store.
but everything else seems good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: angular Issues related to Angular support in Nx type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.