I am loading gulp-load-plugins
and other patterns, but when I use del
package, it says it is undefined:
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', '@*/gulp{-,.}*', 'main-bower-files', 'uglify-save-license', 'del']
});
here is how i use it:
gulp.task('clean', function ()
{
return $.del([...]);
});
error i get:
TypeError: $.del is not a function
In case if you haven't installed del package as your dependency, please install it using the below command,
npm install --save-dev del
And also as suggested by AHC ensure that you've included as part of your devDependencies
in your package.json
which you'll be referring through your gulp-load-plugins
package.
Hope this helps!
if it is already installed, then it is because you should include it in the devdependencies in the package.json file as well, for it to load with gulp-load-plugins
"devDependencies": {
"del": "^2.0.2",
...
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.