E
E
Elon2020-11-29 18:08:34
gulp.js
Elon, 2020-11-29 18:08:34

Using gulpfile how to fix the error?

5fc3b7a2188a3195803349.png

I need to make up a website without updating the page. Recommended this video https://www.youtube.com/watch?v=PgFnfk0rbgk&t but Gulp doesn't work. The error is above

var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var sass = require('gulp-sass');

gulp.task('sass', function (done) {
    gulp.src("sass/*.sass")
        .pipe(sass())
        .pipe(gulp.dest("css"))
        .pipe(browserSync.stream());


    done();
});

gulp.task('serve', function (done) {

    browserSync.init({
        server: ""
    });

    gulp.watch("sass/*.sass", gulp.series('sass'));
    gulp.watch("*.html").on('change', () => {
        browserSync.reload();
        done();
    });


    done();
});

<code>
{
  "name": "huziukp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "browser-sync": "^2.26.13",
    "gulp": "^4.0.2",
    "gulp-sass": "^4.1.0"
  }
}
</code>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question