browser-sync: browser-sync stops working

Issue details

This has been working all along, I was running (browser-sync version 2.10.1, express 4.13.3, node 5.8.0) Not sure when this stopped working. I did recently upgrade to node 6.0.0

Now it’s taking a long time(like minutes) for the browser-sync to open up chrome (chrome Version 50.0.2661.94 (64-bit)). When chrome finally opens, nothing gets loaded, it’s a blank as if it can’t connect to the server. I even tried the latest browser-sync version 2.12.5 but the same behavior.

Steps to reproduce/test case

Please provide necessary steps for reproduction of this issue, or better the reduced test case (without any external dependencies).

Please specify which version of Browsersync, node and npm you’re running

  • Browsersync [ 2.12.5 ]
  • Node [ 6.0.0 ]
  • Npm [ 3.8.6 ]

Affected platforms

  • linux
  • windows
  • [X ] OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • [X ] Gulp
  • Grunt
  • CLI

If CLI, please paste the entire command below

{cli command here}

for all other use-cases, (gulp, grunt etc), please show us exactly how you’re using Browsersync

{Browsersync init code here}

My config setup in gulp

const DEFAULT_PORT = 8008;
const SECURED_PORT = 8010;

const serverOptions = {
  root: 'src',
  port: 8008,
  host: 'http://localhost:',
  livereload: true
};

function runTdd () {
  return runSequence(tasks.startWebServer, tasks.browserSync);
}

// TDD task
gulp.task(tasks.tdd, () => {
  serverOptions.port = DEFAULT_PORT;
  serverOptions.host = 'http://localhost:';
  runTdd();
});

// TDD https task
gulp.task(tasks.tddHttps, function () {
  serverOptions.port = SECURED_PORT;
  serverOptions.host = 'https://localhost:';
  runTdd();
});

// starts web server
//gulp.task(tasks.startWebServer, () => express.run(['server.js']));
gulp.task(tasks.startWebServer, function () {
  //connect.server(serverOptions);
  return express.run([
    'server.js'
  ]);
});

// Browser sync
gulp.task(tasks.browserSync, () => {
  browserSync.init(null, {
    proxy: serverOptions.host + serverOptions.port + '/ng2-examples',
    files: ["src/**/*.*"],
    browser: "google chrome",
    port: 8009,
  });
});

Like I said this was working until recently. Thanks.

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Reactions: 3
  • Comments: 15

Most upvoted comments

ok, I downgraded my nodejs version from 11 to 10.13, and it’s working now.