I have a rather complex build process (using gulp), which builds out (among many other things) about 95 javascript files into various folders scattered throughout a build
directory. I would think simply executing delete
of the build
folder would be straightforward, but no matter what I try, I continuously get some variation of the following error:
events.js:154
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, lstat '/Users/path/to/my/site/build/app/js/services/some-ever-changing-js-file.js'
at Error (native)
Here is the extremely simple gulp task:
gulp.task('clean', '', cb => {
del(['build'], { dryRun: false }, cb)
})
Additional Info:
build/**
, build/**/*.js
, build/**/*.*
, always the same error, not always on the same file.vinylPaths
-- got same result :sadpanda:Has anyone seen this behavior before? Anyone know how to fix it or what could be the cause?
Finally figured it out-- it had nothing to do with the build at all-- another application had this file open and it refused to delete it.