Question

I'm getting this error:

Warning: Unable to write file (Error code: EISDIR)

I'm trying to copy all files and sub folders in a directory.

The below works when I omit ** but then none of my files are copied.

Any ideas how to fix the error?

copy: {
        main: {
            options: {
                expand: true
            },
            files: [
                { src: 'public/static/**', dest: '../../../public/packages/xyz/hello'}

            ]
        }
    },
Was it helpful?

Solution

Your dest is interpreted as a file, but is actually a directory, thus the error. Try postfixing it with a slash:

dest: '../../../public/packages/xyz/hello/'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top