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

EEXIST error since v2.3.0 with overlapping targets. #151

Open
thomeijkenom opened this issue Mar 4, 2025 · 2 comments
Open

EEXIST error since v2.3.0 with overlapping targets. #151

thomeijkenom opened this issue Mar 4, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@thomeijkenom
Copy link

When upgrading to v2.3.0 of this plugin, I get an error when there are overlapping targets.

The code below reflects what I have included in my vite.config.js:

viteStaticCopy({
targets: [
   {src: ['resources/images'], dest: '../' },
   {src: 'app/Platforms/*/resources/images/*.{svg,png,jpeg}',dest: '../images/platforms'}]
});

This results in the following error:
[vite-plugin-static-copy:build] EEXIST: file already exists, mkdir '/public/images'

It seems the plugin tries to create the 'images' folder for both targets. This issue does not occur when I revert back to v2.2.0.

I suspect this may be caused by the change to "improve performance by coping files concurrently when possible".

@sapphi-red
Copy link
Owner

Would you create a minimal reproduction?

@sapphi-red sapphi-red added the bug Something isn't working label Mar 5, 2025
@xrado
Copy link

xrado commented Mar 10, 2025

having same issue after upgrading 2.2.0 -> 2.3.0
Looks like it fails when mkdir which already exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants