gulp-community / gulp-livereload

gulp plugin for livereload
768 stars 67 forks source link

browser doesn't refresh #88

Closed mqliutie closed 9 years ago

mqliutie commented 9 years ago

In my gulpfile.js :

var gulp = require('gulp'),
    less = require('gulp-less'),
    livereload = require('gulp-livereload');

gulp.task('less', function() {
  gulp.src('less/*.less')
    .pipe(less())
    .pipe(gulp.dest('css'))
    .pipe(livereload());
});

gulp.task('watch', function() {
  livereload.listen();
  gulp.watch('less/*.less', ['less']);
});

terminal, I gulp watch . When I change less file terminal give me this message(below picture), But browser doesn't refresh . How can I solve it ?
message

brendanvinson commented 9 years ago

Having this same issue.

ghost commented 9 years ago

Same here, identical config.

choiks141 commented 9 years ago

same here..

nvivo commented 9 years ago

I'm not sure if this is the same case of the others, but as someone coming from a different platform, I've been following examples and gists for hours, including the instructions in this repository to set this up without success.

One thing that was not clear to me at all is that you need to install the livereload chrome extension or inject the livereload.js in your page, either manually or using a middleware. I know the website mentions "this is best used with the extension", but I jumped to "Usage" and just followed the instructions there, missing that completely.

Another thing is that since I was not calling from pipe(), I had to call livereload.reload() instead of livereload().

@vohof, it would be really useful to add a paragraph to the README right before the Usage example saying:

First of all, install the LiveReload chrome extension or setup a middleware (eg. app.use(livereload.middleware( ... )). otherwise it won't work.

This may sound basic, but a lot of people coming to the platform may not know that.

brandonburkett commented 9 years ago

I started running into this today, I just figured it was because of a chrome update?

cyrusdavid commented 9 years ago

@nvivo Thanks, will do that.

lulato commented 9 years ago

@nvivo How exactly do you go about doing that?

nvivo commented 9 years ago

@lulato In my case, I solved it by installing the chrome extension that adds livereload.js to the page.

lulato commented 9 years ago

screen shot 2015-08-16 at 7 33 32 pm

you should probably mention that you need to check that box

Hurtak commented 9 years ago

I had the same issue with chrome extension. Solved it by: 1) allowing extension access to file URL (see lulato's message) 2) using livereload.reload() instead of livereload()

ghost commented 8 years ago

Hello. I have the same issue. I did all what you previously said (chrome plugin, allowing extension access to file URL, I didn't changed livereload() to livereload.reload() because I'm calling it from .pipe so I guess it's no need) But still, my Chrome won't refresh. It's really annoying. Does someone have a clue please ? <3