Home computickets does not work in Gulp browser-sync

does not work in Gulp browser-sync




installed a plugin for Gulp Browser-Sync, set up to update the browser when I change HTML and SASS, but for some reason he writes that the page is updated, although it is not updated on the fact …

var gulp = require ('gulp'),
Mincss = Require ('Gulp-Clean-CSS'),
Sass = Require ('Gulp-Sass')
Gulp.Task ('Mincss', Function () {
 Gulp.Src ('App / CSS / *. CSS')
  .pipe (mincss ())
  .pipe (Gulp.dest ('General / CSS'))
Gulp.Task ('Sass', Function () {
 Return Gulp.Src ('App / Sass / * Sass')
  .pipe (sass ())
  .pipe (Gulp.dest ('General / CSS'))
  .pipe (BROWSERSYNC.Stream ());
Gulp.Task ('Server', ['sass'], function () {
   Server: "App /"
 gulp.watch ('app / sass / *. sass', ['sass']);
 gulp.watch ('app / *. HTML'). ON ('Change', browsersync.reload);

p.s. What did I do wrong?

Answer 1, Authority 100%

You have no reboots, it does not happen to register Reload :


Answer 2

For Fresh Versions Browser-Sync We receive an error message

typeerror: cannot read property 'on' of undefined

so in the config you need to write


This is a change for versions of Browser-Sync more than 2.6

or switch to the use of the new .stream () method

The appropriate ticket on github developers

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions