-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Error: EEXIST: file already exists, mkdir ../../monorepo/apps/tasks/dist #3374
Comments
@VictorPulzz Let me see. |
it's ok? |
oh. this bug fixed now? is it same problem
|
I'm also having this issue. I am trying to update my monorepo from using webpack to rspack and am finding that the hmr doesn't work. As soon as I make any code change I see this in the console: |
I found out that hmr for remote type hints does not work because in the dts-plugin plugin, when calling mkdir functions, the option allowing overwriting of an existing directory ({ recursive: true }) is not passed. If this option is added, then hmr starts working and the error goes away. Created a PR with this change. |
I continued to investigate this problem and found out that the error began to appear with version 0.8.4. I rolled back the packages @module-federation/enhanced and @module-federation/rsbuild-plugin to version 0.8.3 - the error disappeared, hmr works fine. |
@ScriptedAlchemy @2heal1 please pay attention to this issue. |
If you know if a fix. Feel free to send a PR. I'm out of the country so it may take me a while to look at it without a machine. But seems simple enough to debug and PR |
it is fixed? |
PR has failing tests so can't merge it till those pass. |
Describe the bug
I used the simplest example from the rsbuild repository https://github.com/rspack-contrib/rspack-examples/tree/main/rsbuild/module-federation-enhanced. And it gives an error:
Error: EEXIST: file already exists, mkdir '/monorepo/apps/tasks/dist'
at createError (/monorepo/node_modules/.pnpm/@rsbuild[email protected]/node_modules/@rsbuild/core/compiled/rsbuild-dev-middleware/index.js:1814:23)
at Volume.mkdirBase (/monorepo/node_modules/.pnpm/@rsbuild[email protected]/node_modules/@rsbuild/core/compiled/rsbuild-dev-middleware/index.js:3470:42)
at Immediate. (/monorepo/node_modules/.pnpm/@rsbuild[email protected]/node_modules/@rsbuild/core/compiled/rsbuild-dev-middleware/index.js:2424:31)
at process.processImmediate (node:internal/timers:483:21) {
code: 'EEXIST',
path: '/monorepo/apps/tasks/dist'
}
This happens when adding any changes, hmr is triggered and this error appears.
I'm afraid to imagine what will happen when I start adding more packages and the project size increases:D
My config rsbuild.config.ts:
Reproduction
https://github.com/rspack-contrib/rspack-examples/tree/main/rsbuild/module-federation-enhanced
Used Package Manager
pnpm
System Info
Validations
The text was updated successfully, but these errors were encountered: