gulp-community / gulp-livereload

gulp plugin for livereload
768 stars 67 forks source link

Livereload server doesn't seem to start #61

Closed mudetroit closed 9 years ago

mudetroit commented 9 years ago

I am using the basic syntax given, but when I attempt to connect to the livereload server it says that it is not running, and nmap seems to confirm this.

gulp.task 'styles', ->
    gulp.src(['./public/include/less/**/*.less', '!./**/_*.less'])
    .pipe plumber()
    .pipe less()
    .pipe gulp.dest('./public/include/css')
    .pipe livereload()

gulp.task 'watch', ['styles'], ->
    livereload.listen()

    gulp.watch './public/include/less/**/*.less', ['styles']
cyrusdavid commented 9 years ago

@mudetroit Tried to run with DEBUG=* gulp? It binds to localhost by default.

jamesdam commented 9 years ago

Hi @vohof , I am having similar issue, this is the log

  tinylr:server param files +520ms { files: [ '/Users/James/work/slide/build/game.css' ] } undefined undefined [ '/Users/James/work/slide/build/game.css' ]
  tinylr:server Changed event (Files: /Users/James/work/slide/build/game.css) +2ms
[09:28:05] Finished 'css' after 499 ms
[09:28:05] Starting 'default'...
[09:28:05] Finished 'default' after 7.34 μs
  tinylr:server param files +2s { files: [ '/Users/James/work/slide/build/game.js' ] } undefined undefined [ '/Users/James/work/slide/build/game.js' ]
  tinylr:server Changed event (Files: /Users/James/work/slide/build/game.js) +1ms
cyrusdavid commented 9 years ago

@jamesdam it looks like it notifying about changed files just fine based on that. Are you using the chrome extension?

jamesdam commented 9 years ago

@vohof , Yes, I am using the latest version of the chrome extension. It was working fine until a few day ago.

This is the console log from the extension:

screen shot 2015-01-15 at 9 09 46 am

When I do a curl localhost:35729 I get this

{"tinylr":"Welcome","version":"0.1.4"}
jamesdam commented 9 years ago

Update: It turns out that there are some problem with my new proxy settings. Thanks for your help, @vohof !

P/S: I am not closing this issue as It was not opened by me.

cyrusdavid commented 9 years ago

@jamesdam Good for you!

mudetroit commented 9 years ago

@volof I ran the command you asked and it does appear to be starting, not sure why nmap was not picking it up.

Looking at the configuration it appears that I need to configure the server option. Two quick questions, what is an expected input (ip address?), and then what call is that passed into which call(listen?).

cyrusdavid commented 9 years ago

what is an expected input (ip address?)

If the hostname is omitted, the server will accept connections directed to any IPv4 address (INADDR_ANY). It was listening to localhost on earlier but I undid that.

what call is that passed into which call(listen?)

https://github.com/mklabs/tiny-lr/blob/master/lib/server.js#L48 https://github.com/vohof/gulp-livereload/blob/master/index.js#L33 https://github.com/mklabs/tiny-lr/blob/master/lib/server.js#L146 https://github.com/mklabs/tiny-lr/blob/master/lib/server.js#L154

Which version are you using?

mudetroit commented 9 years ago

@vohol Thanks for the help. Apparently being overtired I somehow got server instead of host. What corrected seemed to get it fixed. I did notice that it did still seem to be attaching to the loopback interface.

sudo netstat -tunlp | grep 35729
tcp        0      0 127.0.0.1:35729         0.0.0.0:*               LISTEN      6040/gulp