Open
Description
With what library do you have an issue?
native-federation
Reproduction of the bug/regression with instructions
- create new app with lastest angular 19
- add firebase
ng add @angular/fire
2.1 finishfirebase
config - add and init native federation into project
3.1 runnpm i @angular-architects/native-federation -D
3.2 runng g @angular-architects/native-federation:init --project xadani-admin-ng-19 --port 6161 --type dynamic-host
- run project and see error in console
4.1 error on angular console:

INFO Building federation artefacts
⠴ Building...
Browser bundles
Initial chunk files | Names | Raw size
polyfills.js | polyfills | 188.89 kB |
main.js | main | 277 bytes |
styles.css | styles | 96 bytes |
| Initial total | 189.26 kB
Lazy chunk files | Names | Raw size
chunk-EXLAP6FR.js | bootstrap | 23.22 kB |
Server bundles
Initial chunk files | Names | Raw size
polyfills.server.mjs | polyfills.server | 572.91 kB |
chunk-CUGRFRTP.mjs | - | 24.59 kB |
chunk-DIQMX6Y6.mjs | - | 1.00 kB |
main.server.mjs | main.server | 891 bytes |
server.mjs | server | 621 bytes |
Lazy chunk files | Names | Raw size
chunk-Q3BSBQRX.mjs | bootstrap-server | 1.92 kB |
Application bundle generation complete. [1.512 seconds]
Watch mode enabled. Watching for file changes...
NOTE: Raw file sizes do not reflect development server per-request transformations.
9:50:21 PM [vite] (ssr) Re-optimizing dependencies because vite config has changed
9:50:21 PM [vite] (client) Re-optimizing dependencies because vite config has changed (x2)
➜ Local: http://localhost:6161/
➜ press h + enter to show help
o
9:50:24 PM [vite] (ssr) Error when evaluating SSR module /main.server.mjs: The requested module 'rxfire/auth' does not provide an export named 'authState'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
9:50:24 PM [vite] Internal server error: The requested module 'rxfire/auth' does not provide an export named 'authState'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
9:50:24 PM [vite] Internal server error: The requested module 'rxfire/auth' does not provide an export named 'authState'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:337:24) (x2)
Stackblitz repo: https://stackblitz.com/github/AlonsoK28/xadani-admin-ng-19
Expected behavior
project run correctly when native-federation
is added
Versions of Native/Module Federation, Angular, Node, Browser, and operating system
Native/Module Federation: "@angular-architects/native-federation": "^19.0.16"
Angular:
Angular: 19.2.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, ssr
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1902.1
@angular-devkit/build-angular 19.2.1
@angular-devkit/core 19.2.1
@angular-devkit/schematics 19.2.1
@angular/fire 19.0.0
@schematics/angular 19.2.1
rxjs 7.8.2
typescript 5.7.3
zone.js 0.15.0
Node.js: v18.20.4
Chrome: Lastest
OS: macos 14.6.1
Other information
Note: brach feature/before-native-federation
is working correctly, in this brach I've added firebase and when runs ng s -o
project opens correctly, issue occurs before add native-federation
{
"name": "xadani-admin-ng-19",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"serve:ssr:xadani-admin-ng-19": "node dist/xadani-admin-ng-19/server/server.mjs"
},
"private": true,
"dependencies": {
"@angular/animations": "^19.2.0",
"@angular/common": "^19.2.0",
"@angular/compiler": "^19.2.0",
"@angular/core": "^19.2.0",
"@angular/fire": "^19.0.0",
"@angular/forms": "^19.2.0",
"@angular/platform-browser": "^19.2.0",
"@angular/platform-browser-dynamic": "^19.2.0",
"@angular/platform-server": "^19.2.0",
"@angular/router": "^19.2.0",
"@angular/ssr": "^19.2.1",
"@softarc/native-federation-node": "^2.0.10",
"cors": "^2.8.5",
"es-module-shims": "^1.5.12",
"express": "^4.18.2",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-architects/native-federation": "^19.0.16",
"@angular-devkit/build-angular": "^19.2.1",
"@angular/cli": "^19.2.1",
"@angular/compiler-cli": "^19.2.0",
"@types/express": "^4.17.17",
"@types/jasmine": "~5.1.0",
"@types/node": "^18.18.0",
"jasmine-core": "~5.6.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.7.2"
}
}
I would be willing to submit a PR to fix this issue
- Yes
- No
Metadata
Metadata
Assignees
Labels
No labels
Activity