-
Notifications
You must be signed in to change notification settings - Fork 207
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
NG0203, NG0200 : Errors on upgrading to NG18 and native-federation 18.1.2 #621
Comments
I have run into the same Problem, and at first thought it might be due to a mismatch in versions between the frontend and the shell. But that wasn't the case. The problem only occurs once I bump Angular to version |
I have the same problem but if only build and use simple static server - no problem update again:) the problem is here: in this commit, this is function allow 3 arguments if remove |
I'm in the same boat. Has anyone figured out a solution to this? |
I'm using Angular to version |
Just to add that using Nx Using Nx |
Hi, I can confirm that fix described in #621 (comment) works. Running: on Linux: on MacOS: Fixes the problem (at least temporarily). |
same issue here and temporary solution works from @klerick, please fix as soon as possible, if it is possible. thx. Update: remove write: false has impact on old fashion imported libs -> like boostrap v4 or firebase without @angular/fire implementation, what was problem on version native federation v17. So you resolve one and have to resolve other. |
After spending so much time trying to figure out what I've done wrong with my new angular 18 app, I've cloned the I've then changed the version to 18.1 and 18.0 but always the same problem. Thanks! |
I temporarily solved the problem with Krupczak's recommendation, in this case I updated everything to the latest version, but before that, I deleted the node_modules folder, installed it again and then ran the command |
we have to wait on @manfredsteyer solution man or will be fixed by angular team |
If you want to do this on Windows, you can use the Git Bash cmd and run the linux command |
Yep, that worked for me too. It was due to that breaking change in Angular 18.2.0. So as suggested by others:, I patched the builder.js file: "scripts": {
"ng": "ng",
"workaround:patch:nf": "sed -i 's/{ write: false },//' node_modules/@angular-architects/native-federation/src/builders/build/builder.js",
"start": "yarn workaround:patch:nf && ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
}, |
Thanks @alaindeurveilher
|
In case you want to replace it, using javascript: import { readFileSync, writeFileSync } from 'node:fs';
const path = './node_modules/@angular-architects/native-federation/src/builders/build/builder.js';
const data = readFileSync(path).toString();
writeFileSync(path, data.replace(/\{ write: false }, /, '')); |
We have the same issue but decided to go the other way. We are keeping the versions of angular and native-fedetarion both at ~18.0.x. It was what we used, at the time, for the prototype so we know that it works. IMHO, patching the package in the node_modules is not worth the work/risk... To many situations were you can end up having to re-patch the file: new version still with the bug or a full re-install of the node_modules packages... |
native federation 18.1.2 and angular 18.1.* works |
so after days of investigation i found out, that the problem is just @angular/build library -> 18.2.* is problematic, so this library has to be version 18.1.* , others could be 18.* . |
Sounds great! Ill have a colleague update the prototype with these versions and test it out... |
Hi, thanks for pointing this out. I was able to reproduce this issue. I'm wondering why removing { write: false } helps. I currently don't see the connection. |
Ah, I got it: The signature of buildApplicationInternal changed. This parameter does not exist anymore. Big thanks for pointing this out. I'll make a new version ready. |
Just published a new Version: 18.2.1 |
I still had to do this, it didn't help me installing the version 18.2.3.
this is my setup |
same here |
@gigadie and @marcodemoja you guys are clearly using angular 19 with native-federation 18.2, it would only work with luck. source: https://www.npmjs.com/package/@angular-architects/native-federation (check versions) |
@danimaiochi sorry I forgot to mention that I am using angular v18.2.* . I can't copy/past the content of my package-lock.json file unfortunately but I have just checked the angular version of all the mfe and shell app before commenting on this issue update: |
@marcodemoja try deleting your package-lock, node_modules folder and doing a npm install, I had some issues where it was getting previous cached versions from my tests, once I cleared everything.. |
yep, exactly as I mentioned :) thanks! |
In the meantime, I also checked, if the version 18.2.1 had the "bug" fixed :D |
Hi, oh yeah, I did upgrade to Angular 19 because I saw that this #696 was closed and suggested it was all working fine and the stack here was:
So I thought Native Federation 18.2.x should work with Angular 19.x.x - if that's not the case we should reopen the request to support Angular 19, and maybe provide with an ETA if available. Thank you guys |
Today I upgraded to NG18 (specifically 18.2.0) and native-federation 18.1.2. All was working prior to the upgrade.
Now on loading my shell application I get an error:
I'm not directly injecting anything out of context in my code.
Also, when accessing a remote application, I get a circular dependency error:
My federation configs are all very vanilla:
I'm running a mono repo so shell and remote apps are all within the same project and compiled with NG 18.
Edit: add package.json versions:
The text was updated successfully, but these errors were encountered: