nx icon indicating copy to clipboard operation
nx copied to clipboard

Errors when try to serve Angular MFE apps

Open dkhrunov opened this issue 3 years ago • 5 comments

After updating my monorepo from v13 to Nx v14.5.1 and Angular v14.1.0, I had these errors in the console when trying to run the serve command for an MFE app. But after some waiting, my app started successfully. What the problem is? image

And I had errors at the beginning of the serve command (as in this issue):

Project extension with invalid name ($schema) found.
Project extension with invalid name (tags) found.
Project extension with invalid name (configFilePath) found.

dkhrunov avatar Aug 02 '22 21:08 dkhrunov

08.05.2022 UPD: I noticed that when I run nx serve for a single MFE application, it starts production builds for all applications in my monorepo image

image

dkhrunov avatar Aug 05 '22 08:08 dkhrunov

The second issue has a fix merged and released in Nx 14.5.3.

If you migrate to latest using nx migrate latest you should get it.

As for the first issue, could you share a repo? Or some kind of reproduction?

If you used nx migrate to upgrade your workspace, it could be that a migration went awry.

Coly010 avatar Aug 05 '22 10:08 Coly010

The second issue has a fix merged and released in Nx 14.5.3.

If you migrate to latest using nx migrate latest you should get it.

As for the first issue, could you share a repo? Or some kind of reproduction?

If you used nx migrate to upgrade your workspace, it could be that a migration went awry.

Yes, here you can find my project after migration

dkhrunov avatar Aug 05 '22 10:08 dkhrunov

@Coly010 One clarification, during the migration I encountered a problem, my tsconfig.base.ts file did not allow me to migrate, then I used the workaround described here.

dkhrunov avatar Aug 05 '22 10:08 dkhrunov

After updating to nx v14.5.4 I get this errors when try to start any MFE app. image

But when I removed the folders: /dist, /node_modules and /tmp; Reinstalled all dependencies: yarn / npm install; Try running the MFE application and everything will start as expected.

What was the problem I did not understand.

Thanks!

dkhrunov avatar Aug 05 '22 23:08 dkhrunov

I believe it may have been down to an incorrect package resolution. As there is a workaround and you've got past your issue, I'll close this.

Thanks for reporting!

Coly010 avatar Aug 10 '22 12:08 Coly010

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[bot] avatar Mar 22 '23 02:03 github-actions[bot]