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

module-federation-interop does not run #231

Open
foxaltus opened this issue Jan 17, 2025 · 1 comment
Open

module-federation-interop does not run #231

foxaltus opened this issue Jan 17, 2025 · 1 comment

Comments

@foxaltus
Copy link

The webpack-mf project inside module-federation-interop on the main branch does not run.

Here is the error:

PS C:\...\rspack-examples\rspack\module-federation-interop\webpack-mf> pnpm dev

> [email protected] dev C:\...\rspack-examples\rspack\module-federation-interop\webpack-mf
> webpack serve

[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
 - options has an unknown property '_assetEmittingPreviousFiles'. These properties are valid:
   object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, ipc?, liveReload?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
 ELIFECYCLE  Command failed with exit code 2.
@foxaltus
Copy link
Author

Looks like you need to update webpack-cli to a more recent version (see webpack/webpack-cli#2894 (comment)).

This did the trick in webpack-mf/package.json :

-    "webpack-cli": "4.10.0"
+    "webpack-cli": "5.1.4"

Also don't forget set the mode in webpack.config.js:

module.exports = {
+  mode: isProduction ? "production" : "development",
  entry: "./src/index.js",

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

1 participant