-
Notifications
You must be signed in to change notification settings - Fork 2.3k
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
NX upgrade from 18.0.3 to 18.0.4 breaks all microfrontend static remotes #27941
Comments
@ekiliqua Your error suggests that something went wrong when your remote application was built. However, that error is also coming from older version of Nx. If you continue with your migration forward towards latest Nx, does the same error still get produced? |
@Coly010 yes, the problem is the same... The first attempt was to run 'nx migrate latest' but it was still breaking, so I went version by version to try to locate the error. If migrate to latest only change the literal of the error when try to load "./Agenda" from "utilidades" instead "63855" and the problem with routing is the same. This "upgrade" only change files of nx from 18.0.3 to 18.0.4. |
@ekiliqua Can you continue from version 18.0.4 to latest following this order:
Then, after all this run After the reset has completed, then try to serve your host again. |
@Coly010 The issue persists. After investigating a bit more into the generated remoteEntry.mjs files, they all have the same code. It seems that all of them are the same application exposed on all ports.
It seems that they all export the same: apps/provision-usuarios/src/app/remote-entry/entry.module.ts |
Hello @Coly010, Hello, I think I have found the source of the error. It seems that the migration is done correctly, but what actually breaks the navigation is my configuration of the project.json files... I have removed my configuration and left the default one that comes with a newly created project in version 19. Removing the configuration seems to work; maybe when the static servers are generated, they are not being taken into account, and the redirection does not work. |
That makes sense. I'll see what I can do around this |
@ekiliqua Was this the configuration for one of your remotes, or the host application? I cannot reproduce it. I have a repo here where I have attempted to. https://github.com/Coly010/nx-mf-output-path-differences.git |
@Coly010 You don't need to put it in the shell. Just modify these two lines: And delete this line: If you don't modify the main outputPath of build, there is no problem because static server generates two internal folders correctly: If you put two different outputPaths in both applications, it works correctly. It only happens when you change the outputPath of the two applications and put the same final directory ‘dev’. On the other hand, this seems to be another bug: If in the static-server configuration you have set by default the production configuration profile... it should read the production outputPath and it keeps reading the default optionPath of ‘build’? Thank you very much for your time, best regards. |
Current Behavior
I tried to update to the latest version of NX (19), but it caused several errors. One of those errors is the one I managed to locate by upgrading version by version, specifically from version 18.0.3 to version 18.0.4.
I have several applications (for example, app1, app2, app3). When I run the shell application without any application in devRemotes, everything seems to compile correctly, but when I try to access any of these applications from the shell, it always redirects to the same application (app3) without any console error or something.
I’m not sure if this is related, though I don't think so... One of the applications exposes the following modules:
And when I try to access one of them, I get the following error in the console:
Expected Behavior
Navigation between the applications should work correctly.
GitHub Repo
No response
Steps to Reproduce
upgrade 18.0.3 to version 18.0.4.
I have several applications (for example, app1, app2, app3). When I run the shell application without any application in devRemotes, everything seems to compile correctly, but when I try to access any of these applications from the shell, it always redirects to the same application (app3).
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
In this upgrade, from 18.0.3 to 18.0.4 only changes package versions. Migrations file is empty.
The text was updated successfully, but these errors were encountered: