Answer the question
In order to leave comments, you need to log in
Gulp does not plow, what should I do?
Hello, gulpfile is not working, can you help me solve the problem?
var gulp = require("gulp"),
browserSync = require('browser-sync');
gulp.task('server', function () {
browserSync({
port: 9000,
server: {
baseDir: 'app'
}
});
});
gulp.task('watch', function () {
gulp.watch([
'app/*.html',
'app/js/**/*.js',
'app/css/**/*.css'
]).on('change', browserSync.reload);
});
gulp.task('default', ['server', 'watch']);
$ gulp-v
CLI version 3.9.1
Local version 4.0.0
[12:24:12] Using gulpfile ~\Desktop\sites\star\gulpfile.js
C:\Users\rafamont\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129
gulpInst.start.apply(gulpInst, toRun);
^
TypeError: Cannot read property 'apply' of undefined
at C:\Users\rafamont\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:20
at process._tickCallback (internal/process/next_tick.js:61:11)
at Function.Module.runMain (internal/modules/cjs/loader.js:746:11)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question