-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
-
I encountered an issue when using the Module Federation with the configuration from the quick start guide (Module Federation Quick Start).
Every time I make changes to the Button component exposed from the common package, the following error is triggered:
common: Error: EEXIST: file already exists, mkdir 'D:\wallet-wise\packages\clients\common\dist' common: at createError (D:\wallet-wise\node_modules@rsbuild\core\compiled\rsbuild-dev-middleware\index.js:1814:23) common: at Volume.mkdirBase (D:\wallet-wise\node_modules@rsbuild\core\compiled\rsbuild-dev-middleware\index.js:3470:42) common: at Immediate.<anonymous> (D:\wallet-wise\node_modules@rsbuild\core\compiled\rsbuild-dev-middleware\index.js:2424:31) common: at process.processImmediate (node:internal/timers:491:21) { common: code: 'EEXIST', common: path: 'D:\wallet-wise\packages\clients\common\dist' common: }
This issue seems to happen during the rebuild process when the development server tries to create the dist directory, even though it already exists. It also interrupts the workflow since changes are not properly reflected in the UI.
Steps to Reproduce
- Set up the Module Federation Dev Server with the configuration provided in the quick start guide.
- Expose a simple component (e.g.,
Button) from a package (commonin this case). - Make a change in the
Buttoncomponent. - Observe the error in the console.
Expected Behavior
- The development server should skip creating the
distdirectory if it already exists, or handle the scenario gracefully. - Changes in exposed components should trigger a rebuild without errors.
Environment
- Node.js Version: 22.12.0
- OS: Windows
Additional Notes
- The configuration used matches the quick start guide:
- The
commonpackage exposes theButtoncomponent. - The
uipackage consumes the exposed component.
- The
Beta Was this translation helpful? Give feedback.