Skip to content

feat(nf): compatibility with @angular/build package #806

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

Conversation

Nicoss54
Copy link
Contributor

With the arrival of Angular 20, when initializing a new project, the default builder will be: @angular/build:application.

The native federation package currently still relies on the @angular-devkit/build-angular:application builder to build the application.

However, since version 16, the @angular/build package exists, and some projects are already using it, which leads to an error when using native federation during the build: the @angular-devkit/build-angular:application builder is not found.

This PR fixes this issue and ensures compatibility with Angular 20.

@frans-jobjack
Copy link

@Nicoss54 Any updates on the timeline for merging this PR? Exactly as predicted above, builds are now failing after upgrading to Angular v20, with this error:

yarn run v1.22.22
$ ng build --project my-profile-mfe
An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/src/builders/dev-server/options'
Require stack:
- /Users/frans/Documents/jobjack/Jack.Web.App/node_modules/@angular-architects/native-federation/src/builders/build/builder.js
- /Users/frans/Documents/jobjack/Jack.Web.App/node_modules/@angular/cli/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js

@Nicoss54
Copy link
Contributor Author

@frans-jobjack i have no idea when this one will be merged.

@manfredsteyer do you any idea when you’ll have time to review ?

I can rework on it if needed and can also make the migration to v20 if you want

@frans-jobjack
Copy link

I would greatly appreciate the completion of the migration to v20, since this package is currently blocking us from fully upgrading. Thanks for putting in the time to maintain it.

@Nicoss54 Nicoss54 force-pushed the feature/implement-@angular-build branch from e19a80d to ffbf317 Compare June 3, 2025 08:50
@Nicoss54
Copy link
Contributor Author

Nicoss54 commented Jun 3, 2025

@frans-jobjack you can install @angular-devkit/build-angular package to avoid your error. By installing the package you will not have the error anymore. I just checked the schematics of initialization the native federation with angular 20. The package is installed during the initialization.

My PR is just to use the @angular/build for building instead the @angular-devkit/build-angular

@Nicoss54 Nicoss54 force-pushed the feature/implement-@angular-build branch from f8833a6 to a917bb6 Compare June 3, 2025 09:38
…gular

refactor(nf*): remove useless check builder
@Nicoss54 Nicoss54 force-pushed the feature/implement-@angular-build branch from a917bb6 to 6327367 Compare June 3, 2025 10:25
@frans-jobjack
Copy link

@Nicoss54 Thanks for the advice! It does indeed fix my error. 🙌

@pburgmer
Copy link

pburgmer commented Jul 9, 2025

I have the same problem. After updating to Angular 20, I have to install @anglar-devkit/build-angular manually to my project. Having to install a dependency of native-federation feels odd. native federation should declare it as peer dependency imho.

@manfredsteyer manfredsteyer merged commit 757f62d into angular-architects:main Jul 14, 2025
@manfredsteyer
Copy link
Contributor

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants