rollup-plugin-copy
rollup-plugin-copy copied to clipboard
Error: EEXIST: file already exists
Given the following config:
copy({
targets: [{ src: ["dist", "package.json"], dest: "testing" }],
hook: "writeBundle",
verbose: true,
});
I'm getting the following error. The files are been copied though.
rollup v2.7.2
bundles src/index.tsx → dist/index.cjs.js, dist/index.esm.js...
copied:
copied:
[!] (plugin copy) Error: EEXIST: file already exists, mkdir 'testing/dist'
Error: EEXIST: file already exists, mkdir 'testing/dist'
dist → testing/dist
package.json → testing/package.json
Having the same issue - rollup just throws that error message and then hangs. Any clues @vladshcherbin ? Thanks!
I just ran into this error (only when I have hook: "writeBundle" set)
using rollup 2.60.0 and rollup-plugin-copy 3.4.0
Facing the same issue!
same problem
I have the same problem
UPD: I change the hook from "writeBundle" to "closeBundle" and it works for me.
Proposed fix was released in 3.5.0 under copySync option.
I've tried to replicate the error locally with no luck, hopefully this option will help resolve the errors you have, guys. I'd be happy to see a reproduction repo to better tackle the reason.