Module Federation serving stuck on setup phase
See original GitHub issueCurrent Behavior
When using withModuleFederation
from @nrwl/angular/module-federation
and the code branches into traverseUpFileTreeAndPerformActionUntil
, if the library is missing ng-package.json
(so every lib that isn’t buildable?) the serving is stuck at Generating browser application bundles (phase: setup)...
because it loops endlessy the library folder.
Expected Behavior
The app should be served.
Steps to Reproduce
I’ve migrated the project from Angular 8 to Angular 14. If I expose a newly generated library it works (because the code doesn’t branch into that function), but with our already existing non-publishable libraries it doesn’t, so something went bad down the road. These existing libraries weren’t created with Nx. Help me to find what’s causing this problem.
Environment
Node : 18.4.0
OS : darwin x64
npm : 8.12.1
nx : 14.4.2
@nrwl/angular : 14.4.2
@nrwl/cypress : 14.4.2
@nrwl/detox : Not Found
@nrwl/devkit : 14.4.2
@nrwl/eslint-plugin-nx : 14.4.2
@nrwl/express : Not Found
@nrwl/jest : 14.4.2
@nrwl/js : 14.4.2
@nrwl/linter : 14.4.2
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/nx-plugin : Not Found
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 14.4.2
@nrwl/web : 14.4.2
@nrwl/workspace : 14.4.2
typescript : 4.7.4
---------------------------------------
Community plugins:
@ng-bootstrap/ng-bootstrap: 12.1.2
ngx-bootstrap: 5.1.1
rxjs: 6.6.7
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Module federation - Notes
For our needs, webpack-plugin-serve is perfectly fine in combination with webpack 5. So, as a workaround, install npm 6, install all the packages...
Read more >Webpack Module Federation handling when the remote app is ...
I just forked a sandbox, tried it with success when the both modules available. It has 2 modules, app1 as the host, and...
Read more >Troubleshooting guide - Okta Documentation
Use the Access Gateway troubleshooting guide to resolve issues with your organization's Access Gateway deployment.
Read more >Azure AD Connect Health agent installation - Microsoft Learn
This Azure AD Connect Health article describes agent installation for Active Directory Federation Services (AD FS) and for Sync.
Read more >How I solved and debugged my Webpack issue through trial ...
But I still decided to give it a shot. npm install webpack-serve --save-dev. I created serve.config.js const serve = require('webpack- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@leosvelperez I just noticed that aliasesUnderLibrary when in
tsconfig.base.json
I have this:It get’s a different pattern. Every unique-named lib logs this:
But if I have two libs named shared and shared-somethingelse I get this:
And it loops.
From this
console.log(library, libName, libName.startsWith(library), libName !== library)
it logs this:That true should be false.
Renaming/removing that let everything work as expected.
Thx @mnlttt - will give that a try… and confirm later…