Gulp task problem with del
See original GitHub issueSincerely, I’m not so sure if this error is from this package or gulp. But you can help me. When I call my gulp task clean
gulp.task('clean', cb => {
del(['.tmp', 'dist/*', '!dist/.git'], {dot: true}).then(cb);
});
I get this:
[01:28:16] Requiring external module babel-core/register
[01:30:33] Using gulpfile d:\www\web-starter-kit\gulpfile.babel.js
[01:30:33] Starting 'clean'...
[01:30:34] 'clean' errored after 325 ms
[01:30:34] Error
at formatError (C:\Users\ramasilveyra\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:169:10)
at Gulp.<anonymous> (C:\Users\ramasilveyra\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:195:15)
at emitOne (events.js:77:13)
at Gulp.emit (events.js:169:7)
at Gulp.Orchestrator._emitTaskDone (d:\www\web-starter-kit\node_modules\gulp\node_modules\orchestrator\index.js:264:8)
at d:\www\web-starter-kit\node_modules\gulp\node_modules\orchestrator\index.js:275:23
at finish (d:\www\web-starter-kit\node_modules\gulp\node_modules\orchestrator\lib\runTask.js:21:8)
at cb (d:\www\web-starter-kit\node_modules\gulp\node_modules\orchestrator\lib\runTask.js:29:3)
Maybe a problem with the promise?
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Using del in gulp.series() - Stack Overflow
It doesn't work, because 'clean' task must return some stream. I've found workaround: gulp.task('clean', function() { del.
Read more >Create a gulpfile and Write gulp Tasks Using TypeScript
Learn how to create gulp files in TypeScript and how to define gulp tasks in a class-based style.
Read more >How to Migrate to Gulp.js 4.0 - SitePoint
Consider tasks which don't return the gulp streamed value. For example, a clean task to delete the build folder: const gulp = require( ......
Read more >Running Gulp tasks in series (Example) - Coderwall
#gulp. I ran into a problem today for minifying and concatenating for a CSS library, as I wanted the tasks to run in...
Read more >Using Gulp 4 in your workflow for Sass and JS files
If you can, I'd recommend updating your syntax to reflect this, as it's possible that Gulp will deprecate task() at some point. Problems...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m using it this way (with gulp 4) and the task is run in series, e.g.:
However, since I adopted this new API I keep getting the following error when I first run the task (running it a second time after it causes no problems):
Any thoughts? Needless to say that the test & lint tasks don’t interact with the public folder at all, so I’m not sure why this error is thrown.
Have retested several times today but did not manage to reproduce anymore. I did have a lot of Finder windows open yesterday, so that may have been the cause. I’ve tested with two open windows now, each showing the relevant folder, but it didn’t seem to cause any issues anymore. If I encounter it again I will report back with further information.