hiddentao / gulp-server-livereload

Gulp plugin to run a local webserver with livereload enabled via socket.io. Also comes with standalone command-line interface.
MIT License
93 stars 28 forks source link

Requiring gulp-server-livereload mutes gulp output in OSX. #44

Closed sanbor closed 7 years ago

sanbor commented 7 years ago

I usually use gulp-server-livereload on linux but today I tried the project that I'm working on in OSX and I started noticing that gulp doesn't provide any output. Looks like this bug is only affecting OSX for some reason.

After some investigation I discover that the line of code that causes this issue is requiring gulp-server-livereload. I was able to reproduce the bug by just doing var server = require('gulp-server-livereload'); in an almost empty gulpfile.js, which causes that the command gulp --tasks doesn't have any output in the terminal.

I commented that line and gulp --tasks started working normally.

console.log works in gulpfile.js, it is just gulp output what is affected.

I'm using node 7.0.

sanbor commented 7 years ago

Here is the gulpfile that reproduces the bug:

var gulp = require('gulp');
var server = require('gulp-server-livereload');
console.log('wat');
gulp.task('webserver', function() {
    console.log('test');
);

This casuses gulp --tasks to have no output. By commenting the line var server = require('gulp-server-livereload'); then gulp --tasks starts working as usual.

cmolina commented 7 years ago

Same behavior on Windows and Ubuntu. Going back to version 1.5.4 fixes the issue.

SteffanDonal commented 7 years ago

Can confirm that my logging changes from the previous version have caused this. Wasn't aware of it at the time, apologies, I will jump on this as soon as I am able.

hiddentao commented 7 years ago

1.9.1 published with the fix.