grunt-contrib-clean
grunt-contrib-clean copied to clipboard
Fatal error: ENOENT, no such file or directory
I have a very simple clean task.
clean: {
temp: {
src: ['tmp', 'dist/app-tmp.js']
}
}
I then run this watch task.
watch: {
dev: {
files: [ 'Gruntfile.js', 'app/*.js', 'app/**/*.js', 'app/**/*.html', '*.html', '**/*.scss' ],
tasks: [ 'jshint', 'browserify:bundle', 'ngtemplates', 'concat:js', 'compass', 'copy', 'clean:temp' ],
options: {
atBegin: true
}
}
}
Here is a sporadic error I get:
Running "clean:temp" (clean) task Cleaning tmp...OK
Done, without errors. Fatal error: ENOENT, no such file or directory 'c:\Users\j***\tmp'
File "tmp" deleted. // watch task will now restart from beginning
It's weird that the error is thrown but then the next message is that the directory was deleted. After this block gets printed, the watch task will simply start over again. NOTE: This error doesn't get thrown all the time, it's seemingly random.
Anyone else experiencing these problems? I'm developing on Windows 7 and that seems to be a common problem with grunt-contrib-clean but I was hoping I could add some code in my clean task to ensure this error doesn't get thrown.
I'm with you, same behavior here