Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Module Federation Dev Server] Error EEXIST when rebuilding exposed modules #4326

ridaoc19 started this conversation in General
Discussion options

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

  1. Set up the Module Federation Dev Server with the configuration provided in the quick start guide.
  2. Expose a simple component (e.g., Button) from a package (common in this case).
  3. Make a change in the Button component.
  4. Observe the error in the console.

Expected Behavior

  • The development server should skip creating the dist directory 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 common package exposes the Button component.
    • The ui package consumes the exposed component.

image

You must be logged in to vote

Replies: 0 comments

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

AltStyle によって変換されたページ (->オリジナル) /