Hi, we want to split our applications via Module Federation. Works so far except for the applications that use Kendo UI (simple split button is enough). We always get the following error message.
"
ERROR Error: Uncaught (in promise): Error: It looks like your application or one of its dependencies is using i18n.Angular 9 introduced a global `$localize()` function that needs to be loaded.
Please run `ng add @angular/localize` from the Angular CLI.
(For non-CLI projects, add `import '@angular/localize/init';` to your `polyfills.ts` file.
For server-side rendering applications add the import to your `main.server.ts` file.)
Error: It looks like your application or one of its dependencies is using i18n.
Angular 9 introduced a global `$localize()` function that needs to be loaded.
Please run `ng add @angular/localize` from the Angular CLI.
(For non-CLI projects, add `import '@angular/localize/init';` to your `polyfills.ts` file.
For server-side rendering applications add the import to your `main.server.ts` file.)
at _global.$localize (core.mjs:31692:15)
at consts (progress-kendo-angular-buttons.mjs:2559:31)
at createTView (core.mjs:12070:60)
at getOrCreateComponentTView (core.mjs:12045:28)
at addComponentLogic (core.mjs:12780:19)
at instantiateAllDirectives (core.mjs:12583:9)
at createDirectivesInstances (core.mjs:12008:5)
at ɵɵelementStart (core.mjs:16299:9)
at MyComponent_Template (my-component.component.html:2:6)
at executeTemplate (core.mjs:11966:13)
at resolvePromise (zone.js:1193:31)
at resolvePromise (zone.js:1147:17)
at zone.js:1260:17
at _ZoneDelegate.invokeTask (zone.js:402:31)
at core.mjs:10715:55
at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:10715:36)
at _ZoneDelegate.invokeTask (zone.js:401:60)
at Object.onInvokeTask (core.mjs:11028:33)
at _ZoneDelegate.invokeTask (zone.js:401:60)
at Zone.runTask (zone.js:173:47)
"
Hi Daniel and Amith,
Our components have a dependency for Angular localize and it needs to be installed in the project. I will also suggest finding some online resources regarding Module Federation and Angular localize as it might need some additional setup.
https://github.com/nrwl/nx/discussions/11777
https://github.com/nrwl/nx/issues/11121
https://www.angulararchitects.io/en/blog/pitfalls-with-module-federation-and-angular/
I hope this helps.
Regards,Yanmario
Progress Telerik