Lot's of Warnings when using Webpack Module Federation
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
In our project, we’re using Webpack Module Federation with the following share:
new ModuleFederationPlugin({
shared: {
...deps,
"@mui/private-theming": {singleton: true},
"@mui/material/styles": {singleton: true},
"@mui/styles": {singleton: true},
"react": {singleton: true},
"react-dom": {singleton: true},
When building our project we’ve a lot of warnings like the following:
WARNING in shared module @mui/material/styles
No required version specified and unable to automatically determine one. Unable to find required version for "@mui/material" in description file (/home/mpo/icCube/gh/icCubeReportingMF/ic3-reporting/node_modules/@mui/lab/CalendarPicker/package.json). It need to be in dependencies, devDependencies or peerDependencies.
It seems the CalendarPicker/package.json file is missing the following:
"peerDependencies": {
"@mui/material": "^5.0.0"
}
With this peerDependencies the warning disappear. There’s a lot as well with ‘react’ dependency missing…
Does anybody experience the same issue? Am I missing something with my setup?
If not would it be possible to update the package.json in the MUI project?
Let me know if you need more info.
Expected behavior 🤔
No such warnings.
Steps to reproduce 🕹
Steps:
- Build a project with Webpack Module Federation as shown in the description of this issue.
Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Lot's of Warnings when using Webpack Module Federation
When building our project we've a lot of warnings like the following: WARNING in shared module @mui/material/styles No required version ...
Read more >Module Federation - webpack
The container tries to provide shared modules, but if the shared module has already been used, a warning and the provided shared module...
Read more >Webpack Module Federation loads chunks from wrong URL
I am building a project with webpack module federation with the following setup: React host (running on localhost:3000 ); Angular Remote 1 ...
Read more >Pitfalls with Module Federation and Angular
In this article, I'm going to destroy my Module Federation example! However, you don't need to worry: It's for a very good reason....
Read more >Five Module Federation/Micro-Frontend Mistakes - YouTube
Module Federation is an advanced front-end topic, that's for sure, so let's talk about some mistakes that people make, and misconceptions ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mnajdova still several warnings w/ latest (5.2.3)… we’ve done a small script to add “missing” dependencies for all files triggering a warning in our node_modules/
@mnajdova nothing new since the reporting of that issue and my latest comment. still running a script to remove those warnings.