BrowserSync / gulp-browser-sync

How to use the Browsersync module with gulp.
http://browsersync.io
384 stars 27 forks source link

Unhandled `error` event on Windows 8 #8

Closed fsylum closed 10 years ago

fsylum commented 10 years ago

Hi,

I'm running into a little bit of problem to get browser-sync running with gulp

Here's the error thrown

[BS] Server running. Use this URL: http://192.168.0.196:3002
[BS] Serving files from: D:\Project\Personal\vanilla/dist/
[BS] Watching files...

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: This socket is closed.
    at Socket._write (net.js:637:19)
    at doWrite (_stream_writable.js:226:10)
    at writeOrBuffer (_stream_writable.js:216:5)
    at Socket.Writable.write (_stream_writable.js:183:11)
    at Socket.write (net.js:615:40)
    at Socket.Writable.end (_stream_writable.js:341:10)
    at Socket.end (net.js:396:31)
    at Static.gzip (D:\Project\Personal\vanilla\node_modules\browser-sync\node_m
odules\socket.io\lib\static.js:207:14)
    at ready (D:\Project\Personal\vanilla\node_modules\browser-sync\node_modules
\socket.io\lib\static.js:370:14)
    at D:\Project\Personal\vanilla\node_modules\browser-sync\node_modules\socket
.io\lib\static.js:103:9

my browser-sync task

gulp.task( 'browser-sync', function() {
    var options = {
        server: {
            baseDir: 'dist/'
        }
    }

    browserSync.init( [ paths.css.dest + '/*.css', paths.js.dest + '/*.js', paths.img.dest + '/*.{gif,jpg,png}', 'dist/*.html' ], options );
});

paths is defined previously. The problem is browser-sync only run for a few second, open up the page in browser then throw that error.

Something like the thread here

Additional info, node v0.10.26, npm v1.4.3, browser-sync v0.7.5

shakyShane commented 10 years ago

Are you using Socket.io in your app?

fsylum commented 10 years ago

I am not aware of any. Here's the full gulpfile if it helps

shakyShane commented 10 years ago

reproduced on my windows 8 machine - looking into it

fsylum commented 10 years ago

The updates works perfectly. Thanks!