grunt-contrib-copy icon indicating copy to clipboard operation
grunt-contrib-copy copied to clipboard

Grunt-Copy-JS annoying Warning: EPERM: operation not permitted, futime Use --force to continue.

Open typoworx-de opened this issue 4 years ago • 3 comments

I'm constantly getting this Error:

Warning: EPERM: operation not permitted, futime Use --force to continue.

I'm working on Ubuntu 16 Linux. Just for notice I'm working with mount-option "noatime". I tried to figure out what's wrong and noticed grund-copy uses futimeSync somewhere which seems to depend on atime and mtime? Is this optionally or can grund-copy handle if Linux doesn't have atime enabled?

I don't know why but sometimes fiddling around with deleting node_modules works, sometimes chown/chmod works, sometimes fiddling hours around on my Gruntfile does the trick. Still don't know where the real culprit is since the Gruntfile worked before without changes and in the next project it's driving me crazy again.

typoworx-de avatar Oct 21 '20 20:10 typoworx-de

Okay... just got it working .. still not getting the point what it is while fiddling around. Just 5 min later it stuck again driving me crazy :-(

typoworx-de avatar Oct 21 '20 21:10 typoworx-de

Kind of late in the day, but this appears to be related to syntax rather than an actual permissions issue. In my gruntfile I had to change the syntax from:

    copy: {
            files: {
                cwd: 'node_modules/filestocopy',
                src: '**/*',
                dest: './path/to/copiedfiles',
                expand: true
            }
     },

to:

    copy: {
            main: {
                files: [
                    {
                        cwd: 'node_modules/filestocopy',
                        src: ['**/.*'],
                        dest: './path/to/copiedfiles',
                        expand: true
                    },
                ],
            },
    },

The important part of the change appears to be the change to the 'src' line, in particular the addition of the '.' in '**/.*'

redcuillin avatar May 30 '23 23:05 redcuillin