Gulp undefined is not a function

Here I am new to node, angular, gulp. I am using gulp to generate files with minimum values, while I run the gulp task I am given the error

enter image description here

Below is my gulpfile.js code

gulp.task('dev', function(){
var builtPartialDev = gulp.src(paths.partials)
    .pipe(plugins.htmlhint({'doctype-first':false}))
    .pipe(plugins.htmlhint.reporter())
    .pipe(gulp.dest(paths.distDev));

var buitStyleDev = gulp.src(paths.styles)
    .pipe(plugins.less())
    .pipe(gulp.dest(paths.distDev));

var builtAppScriptsDev = gulp.src(paths.scripts)
    .pipe(plugins.jshint())
    .pipe(plugins.jshint.reporter('jshint-stylish'))
    .pipe(gulp.dest(paths.distDev))
    .pipe(plugins.angularFilesort());

var builtVendorScriptsDev = gulp.src(bowerFiles())
    .pipe(gulp.dest(paths.distDevBowerComponents))
    .pipe(plugins.order(['jquery.js', 'angular.js', 'angular-ui.js', 'ui-bootstrap.js', 'ui-bootstrap-tpls.js']));


var builtIndexDev = gulp.src(paths.index)
    .pipe(plugins.htmlhint())
    .pipe(plugins.htmlhint.reporter())
    .pipe(gulp.dest(path.distDev))
    .pipe(plugins.inject(builtVendorScriptsDev, {relative:true, name:'bower'}))
    .pipe(plugins.inject(builtAppScriptsDev, {relative:true}))
    .pipe(plugins.inject(buitStyleDev, {relative:true}))
    .pipe(gulp.dest(paths.distDev));

return es.merge(builtIndexDev, builtPartialDev) 

});

      

+3


source to share


1 answer


You need to require gulp in your gulpfile. Add the following line to your file:

var gulp = require('gulp')



You will probably also have to install gulp for your project, which you can do with npm install --save gulp

.

If you don't have npm, I suggest you learn how to install and use it.

0


source







All Articles