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

A bunch of MFE build errors after bootstrap #6

Open
billy-briggs-dev opened this issue Jan 20, 2022 · 5 comments
Open

A bunch of MFE build errors after bootstrap #6

billy-briggs-dev opened this issue Jan 20, 2022 · 5 comments

Comments

@billy-briggs-dev
Copy link

billy-briggs-dev commented Jan 20, 2022

After performing the initial yarn bootstrap

mfe2: An unhandled exception occurred: Cannot find module 'ngx-build-plus/package.json

I tried manually adding the dependency using yarn, but then this nasty error popped up:

This version of CLI is only compatible with Angular versions ^13.0.0 || ^13.1.0-next, but Angular version 12.2.15 was found instead.

My local package for Mfe2 has CLI v12.2.14. So I thought maybe the version of ngx-build-plus v13.0.1 was incompatible with angular 12. So I downgraded to v12.2.0 for ngx-build-plus. Then we get another missing module error:

An unhandled exception occurred: Cannot find module 'typed-assert'

I manually added that dependency aswell, and the angular CLI version mismatch error appeared again.

This version of CLI is only compatible with Angular versions ^13.0.0 || ^13.1.0-next, but Angular version 12.2.15 was found instead.

Any help or ideas for cleaning up these dependencies would be greatly appreciated!

@vugar005
Copy link

I had same problem and I installed using npm i on each repo.

@billy-briggs-dev
Copy link
Author

Thanks I'll give that a go!

@ninjabhishek
Copy link

this was helpful! however, you can change yarn to npm in lerna.json at root, remove node_modules everywhere and can still execute bootstrap to achieve this. looks like yarn.lock has stuffs missing/incorrect

@vugar005
Copy link

yes, yarn was mainly used to solve 'resolve' feature in package.json which was needed for Angular v11 to install webpack 5 since it was using webpack 4 by default.

@mannb1
Copy link

mannb1 commented Jun 1, 2022

I have made the code changes in the example from the pull request to 'Change lerna config to use npm and add lazy loaded mfe3 module', but I am a bit confused as to what the steps are now, do I need to delete all node_modules from each project and then what? do I need to install, bootstrap and start again and if so what exact commands do I use now? Are they all now npm?

npm -- Install dependencies
npm bootstrap -- Install dependencies of all micro frontends and shell with lerna
npm start -- Starts the shell and all Micro Frontends with lerna

Any help would be greatly appreciated, I would love to get this example up and running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants