You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I start the dev-server, it reports a warning of:
WARNING in shared module my-pkg/module-a
No required version specified and unable to automatically determine one. Unable to find required version for "my-pkg" in description file (.../packages/my-pkg/package.json). It need to be in dependencies, devDependencies or peerDependencies.
And according to the warning, I added the package itself as a dependency, the warning disappears:
The Module federation warning "Unable to find required version" is fixed
since webpack v5.78.0 for modules which do package.json
self-referencing.
Ref:
- webpack/webpack#16683
- webpack/webpack#16685
Bug report
What is the current behavior?
In an esm package, I have two modules, one imports another by self referencing
In another app, I use module federation and share the two modules:
When I start the dev-server, it reports a warning of:
And according to the warning, I added the package itself as a dependency, the warning disappears:
If the current behavior is a bug, please provide the steps to reproduce.
It's a bit complex in my real repo, I can provide a minimal repro if you require, when I got time.
What is the expected behavior?
No warnings. It should use the description file (
my-pkg/package.json
) itself to determine the required version, since it's a self referencing.Other relevant information:
webpack version: 5.75.0
Node.js version: 16.15.0
Operating System: MacOS
Additional tools:
The text was updated successfully, but these errors were encountered: