grunt-contrib-copy
grunt-contrib-copy copied to clipboard
Grunt-Copy-JS annoying Warning: EPERM: operation not permitted, futime Use --force to continue.
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.
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 :-(
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 '**/.*'