Comments (3)
OK this is weird. Some data points on this issue:
var del = require("del");
var gulp = require("gulp");
gulp.task("clean", function() {
return del([ "some_glob_leading_to_error"]);
});
No errors are printed, process stops. However, check this:
var del = require("del");
var gulp = require("gulp");
var util = require("util");
gulp.task("clean", function() {
return del([ "some_glob_leading_to_error"]);
});
process.on("exit", function(exitcode) {
console.log(util.inspect(gulp.tasks["clean"]));
});
This prints:
{ fn: [Function],
dep: [ 'document_clean' ],
name: 'clean',
args:
{ task: 'clean',
message: 'clean promise',
duration: 5.95151387,
hrDuration: [ 5, 951513870 ],
err:
{ [Error: EBUSY: resource busy or locked, rmdir 'C:\some_dir']
errno: -4082,
code: 'EBUSY',
syscall: 'rmdir',
path: 'C:\\some_dir' } },
running: false,
duration: 5.95151387,
hrDuration: [ 5, 951513870 ],
done: true }
So, gulp apparently does get the error and doesn't print it. Time for some generic tests with promises:
var gulp = require("gulp");
var Promise = require("bluebird");
gulp.task("clean", function() {
return Promise.reject(new Error("foo"));
});
Gulp nicely prints the error "foo".
This is with gulp 3.9.1.
So gulp can handle promises and del returns an error and somehow it doesn't work together.
from del.
And does it do something with a catch
function? It should be the same though, but you never know.
from del.
What happens if you use Gulp 4? npm install gulpjs/gulp#4.0
How it orchestrates tasks under the hood is completely different. And it's very stable, I have been using it a lot for the past 6 months without any hiccups.
from del.
Related Issues (20)
- Add `progress` event
- Filenames with parentheses not deleted
- why 'del' restores the files I have deleted using 'rimraf'
- 5. X and 6 X performs wildcard recursive directory deletion, which is invalid
- Weird problem in the npm page HOT 1
- Upgrade: v7 convert to ESM lets Disscuse the API HOT 6
- Error: Cannot delete files/directories outside the current working directory HOT 1
- Release Notes for version 7 are incorrect HOT 1
- Build fail when using Babel HOT 3
- Couldn't delete dot files in del7.0.0 HOT 1
- [v8] Make the `dot` option true by default?
- Cannot find module 'del' HOT 1
- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" HOT 2
- Protocol 'node:' not supported HOT 1
- Add path to ProgressData
- Build is failing in CI HOT 2
- Update supported engines to >=16 HOT 1
- Why not use rollup to provide a commonjs module? HOT 1
- Unable to require/import this module into gulp HOT 1
- [ava, xo] Some internal modules are deprecated. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from del.