Skip to content
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

Endless Angular static remotes building #20973

Closed
1 of 4 tasks
IKatsuba opened this issue Jan 2, 2024 · 15 comments
Closed
1 of 4 tasks

Endless Angular static remotes building #20973

IKatsuba opened this issue Jan 2, 2024 · 15 comments
Assignees
Labels
blocked: repro needed outdated scope: angular Issues related to Angular support in Nx scope: module federation Issues related to module federation support stale type: bug

Comments

@IKatsuba
Copy link
Contributor

IKatsuba commented Jan 2, 2024

Current Behavior

I have eight Angular remote apps and a host. All of them have the standard configuration by official generators. All apps are built in the dist folder.

Everything is all right if I start nx serve host for the first time (there is no dist).

But if dist exists, the dev server does not start. I endlessly see this message:
image

I found the buildStaticRemotes function in the Angular Module Federation Dev Server. For no reason the exit event fires earlier than the data event.

Expected Behavior

All remotes are built, and the dev server started.

GitHub Repo

No response

Steps to Reproduce

I can't reproduce the same behavior with the statically generated repo. But maybe the exit event has to have a similar handler as the data event?

Nx Report

Node   : 20.10.0
   OS     : darwin-arm64
   npm    : 10.2.3
   
   nx                 : 17.2.8
   @nx/js             : 17.2.8
   @nx/jest           : 17.2.8
   @nx/linter         : 17.2.8
   @nx/eslint         : 17.2.8
   @nx/workspace      : 17.2.8
   @nx/angular        : 17.2.8
   @nx/cypress        : 17.2.8
   @nx/devkit         : 17.2.8
   @nx/eslint-plugin  : 17.2.8
   @nx/node           : 17.2.8
   @nx/playwright     : 17.2.8
   @nx/plugin         : 17.2.8
   @nx/storybook      : 17.2.8
   @nrwl/tao          : 17.2.8
   @nx/web            : 17.2.8
   @nx/webpack        : 17.2.8
   nx-cloud           : 16.5.2
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   @maskito/angular         : 1.4.0
   @storybook/angular       : 7.6.6
   @taiga-ui/cdk            : 3.26.0
   @taiga-ui/core           : 3.26.0
   @testing-library/angular : 14.5.0

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@AgentEnder AgentEnder added scope: angular Issues related to Angular support in Nx scope: module federation Issues related to module federation support labels Jan 9, 2024
@jeffschulzusc
Copy link

same here

@kevinriemens
Copy link

Same here

@MaxSassen
Copy link

image
Same here, since this week im stuck on building X static remotes ....
not sure if this is the dist folder issue or another (after deleting the dist, its still not working)

@pachesnyi
Copy link

Hi, guys. Any updates on this one?

@leosvelperez
Copy link
Member

Thanks for reporting this! I'm sorry for the delay in getting to it.

There's little information we can use to reproduce the issue. I tried to reproduce it by creating a workspace with a host and a few remotes (using the official generators) and it's serving the host and static remotes correctly.

Could someone provide a reproduction so we can troubleshoot this?

@kevinriemens
Copy link

kevinriemens commented Apr 18, 2024

On thing I've noticed is the following: when doing an nx reset, the static remotes are building. Consecutive runs have this issue.
Same behaviour as I've described in this issue: #22722

Copy link

github-actions bot commented May 3, 2024

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label May 3, 2024
@kalpeshhpatel
Copy link

Hi team,

I am facing the similar issue and not able to proceed. Is there any workaround or fix available?

Thanks

@Coly010
Copy link
Contributor

Coly010 commented May 9, 2024

@kalpeshhpatel Still waiting on a reproduction. If you can provide one that would great

@github-actions github-actions bot removed the stale label May 10, 2024
Copy link

This issue has been automatically marked as stale because no reproduction was provided within 7 days.
Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue.
Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues.
This issue will be closed in 21 days if a reproduction is not provided.
If a reproduction has been provided, please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label May 17, 2024
@kevinriemens
Copy link

kevinriemens commented May 17, 2024

Reproduction should be possible with:

Node: 18.19.1
OS: darwin-arm64
yarn: 1.22.21
nx: 19.0.4
@nx/js : 19.0.4
@nx/jest : 19.0.4
@nx/linter : 19.0.4
@nx/eslint : 19.0.4
@nx/workspace : 19.0.4
@nx/angular : 19.0.4
@nx/cypress : 19.0.4
@nx/devkit : 19.0.4
@nx/eslint-plugin : 19.0.4
@nrwl/tao : 19.0.4
@nx/web : 19.0.4
@nx/webpack : 19.0.4
typescript : 5.4.3


Community plugins:
@ngneat/transloco : 4.1.2
@ngrx/component-store : 17.0.1
@ngrx/effects : 17.0.1
@ngrx/entity : 17.0.1
@ngrx/router-store : 17.0.1
@ngrx/schematics : 17.0.1
@ngrx/store : 17.0.1
@ngrx/store-devtools : 17.0.1

Additional Info

We are using:
Angular in NgModule setup, Module Federation, 1x shell 2x remote, 5x libs, SSR.

Issues:

  1. On the first build, the static remotes Builds, but the second remote has trouble finding the correct RemoteEntry, so it messes up the routing/guards for that Remote
  2. On every consecutive run, the Static Remotes build endlessly. It just stuck at the message: Building 2 static remotes...

We had this issue since 17.2+ now.

Currently our only working workaround is configuring the remotes as devRemotes, which works, but is slow af.

@github-actions github-actions bot removed the stale label May 18, 2024
Copy link

This issue has been automatically marked as stale because no reproduction was provided within 7 days.
Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue.
Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues.
This issue will be closed in 21 days if a reproduction is not provided.
If a reproduction has been provided, please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label May 26, 2024
@MaxSassen
Copy link

MaxSassen commented May 30, 2024

was working again until now.. i migrated to 19.1.1:

Node   : 21.5.0
OS     : darwin-x64
npm    : 10.2.4

nx (global)        : 18.0.8
nx                 : 19.1.1
@nx/js             : 19.1.1
@nx/jest           : 19.1.1
@nx/linter         : 19.1.1
@nx/eslint         : 19.1.1
@nx/workspace      : 19.1.1
@nx/angular        : 19.1.1
@nx/cypress        : 19.1.1
@nx/devkit         : 19.1.1
@nx/eslint-plugin  : 19.1.1
@nx/nest           : 19.1.1
@nx/node           : 19.1.1
@nx/playwright     : 19.1.1
@nx/plugin         : 19.1.1
@nrwl/tao          : 19.1.1
@nx/web            : 19.1.1
@nx/webpack        : 19.1.1
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/playwright/plugin
---------------------------------------
Community plugins:
@compodoc/compodoc : 1.1.23
@ngneat/input-mask : 6.1.0
@nx-go/nx-go       : 2.8.0
apollo-angular     : 6.0.0

removed dist / node-modules etc..

Copy link

github-actions bot commented Jun 7, 2024

This issue has been automatically marked as stale because no reproduction was provided within 7 days.
Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue.
Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues.
This issue will be closed in 21 days if a reproduction is not provided.
If a reproduction has been provided, please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Jun 7, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: repro needed outdated scope: angular Issues related to Angular support in Nx scope: module federation Issues related to module federation support stale type: bug
Projects
None yet
Development

No branches or pull requests

9 participants