Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gulp browser sync open chrome only

I am attempting to open Chrome and Firefox when browser-sync module initializes the web server.

My gulp task has the following:

browserSync.init(null, {
  files: config.destination.root + '/**/*',
  browser: ["google chrome", "firefox"],
  port: config.port,
  notify: false,
  server: {
    baseDir: config.destination.root
  },
  startPath: config.pocSuffix
}, callback);

My current default is set to IE.

It is still opening only IE. How do i troubleshoot this?

like image 928
Roman Avatar asked Jul 10 '14 21:07

Roman


Video Answer


1 Answers

To me it seems that neither "google chrome" nor "firefox" was found in your instance, and that IE then kicked in as the default one.

In my scenario I have a Ubuntu 15.10 minimal install with openbox, and chrome set as default browser. Various configurations and results follows:

  1. No browsersync browser set. spawns firefox
  2. "google chrome" set. error: spawn google chrome ENOENT.
  3. "chrome" set. error: spawn google chrome ENOENT.
  4. "google-chrome" set in browsersync. spawns chrome

Using "chrome" solved it for you. Using "google-chrome" solved it for me.

Mentioning it as an answer, in case someone ends up here by googling the issue.

like image 76
andersoyvind Avatar answered Oct 13 '22 23:10

andersoyvind