Replies: 10 comments 11 replies
-
|
same error here |
Beta Was this translation helpful? Give feedback.
-
|
I also have the same problem |
Beta Was this translation helpful? Give feedback.
-
|
I declared each component in the shared of shared: {
...shareAll({
singleton: true,
strictVersion: true,
requiredVersion: 'auto',
transient: true
}),
'@primeng/themes/types': {
packageInfo: {
entryPoint: 'node_modules/@primeng/themes/index.mjs',
version: '19.0.5',
esm: true
}
},
'@primeng/themes/aura/accordion': {
packageInfo: {
entryPoint: 'node_modules/@primeng/themes/aura/accordion/index.mjs',
version: '19.0.5',
esm: true
}
},
'@primeng/themes/aura/autocomplete': {
packageInfo: {
entryPoint: 'node_modules/@primeng/themes/aura/autocomplete/index.mjs',
version: '19.0.5',
esm: true
}
},
and so on ...
} |
Beta Was this translation helpful? Give feedback.
-
|
@meloryayala I tryed something different and works, look: 1 - I create a new host and new remote angular projects with angular v19. HOST federation.config.js REMOTE fededation.config.js Although when u open the apps, this erros on vite appears: But application still work |
Beta Was this translation helpful? Give feedback.
-
|
Thank you, everyone! 🎉 My monorepo project uses Nx, Angular (~19.1.0), and PrimeNG (^19.0.6). I configured Module Federation only in the shell app, and it works perfectly for me. 🚀 const { module.exports = withNativeFederation({ shared: { extraOptions: { skip: [ |
Beta Was this translation helpful? Give feedback.
-
|
ok, but surely we can find an issue with this shared config of the Primeng themes: what will happens if host use, for example, theme/material, and the remote use theme/aura? i think that host and remote have to separate completely their styles, so the shared solution is limited. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks to the previous answers i got primeng running in a very basic sample project. |
Beta Was this translation helpful? Give feedback.
-
|
Certainly! Here's a clear English description of the issues you were facing with Module Federation and PrimeNG: 🧩 Problem Summary: Integrating PrimeNG with Angular Module Federation You were building a micro frontend architecture using Angular 19, Standalone Components, and Module Federation. Your goal was to: Define the PrimeNG theme and configuration centrally in the Host project. Share that theme/config globally across all Remote (Micro Frontend) projects. Use providePrimeNG() in the Host and expect it to propagate into Remotes. PRIME_NG_CONFIG is null in Remote apps NullInjectorError: No provider for InjectionToken PRIME_NG_CONFIG! PrimeNG theme not applied to Remote components inject(PRIME_NG_CONFIG) throws NG0203 NG0203: inject() must be called from an injection context... when trying to call inject() outside of a valid Angular injection context, especially in the main.ts or root-page.component.ts. Confusion with shared configuration Inconsistent injection behavior 🛠 Root Cause Angular's Dependency Injection (DI) does not automatically pass providers like providePrimeNG() across Micro Frontend boundaries via Module Federation. Even with shared libraries and singleton flags, DI providers must be explicitly registered in each Remote's own application setup. |
Beta Was this translation helpful? Give feedback.
-
|
Here's a thread in the Native Federation Github page related to PrimeNG, maybe it helps someone angular-architects/module-federation-plugin#916 |
Beta Was this translation helpful? Give feedback.
-
|
Hi, shell app federation config: const { withNativeFederation, shareAll } = require('@angular-architects/native-federation/config'); module.exports = withNativeFederation({ shared: { skip: [ // Please read our FAQ about sharing libs: }); and also imports in styles.scss Issue: .p-datepicker-input-icon-container { |
Beta Was this translation helpful? Give feedback.





Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am struggling with primeng and theme 19.0.5, I've installed it in my remote native federation and I have this error: "Unable to resolve specifier '@primeng/themes/aura/accordion' imported from http://localhost:4204/_primeng_themes_aura", Could anyone help me please, what I have to do.
My angular version is 19.1.0
Beta Was this translation helpful? Give feedback.
All reactions