I am trying to use BrowserSync version 2.26.12 on a Ubuntu 20.04 LTS web server.
I have created a configuration file (bs-congig.js) by running:
$ browser-sync initand edited it by changing the value of "open" from "local" to "false".
I run BrowserSync as follows:
$ browser-sync --config=bs-config.js
[Browsersync] Access URLs: --------------------------------------- Local: External: --------------------------------------- UI: UI External: ---------------------------------------
[Browsersync] Serving files from: /var/www/mybsync
[Browsersync] Couldn't open browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false)… it then hangs, and I need to kill the process to terminate it.
I am sure that my bs-config.js is read by browser-sync, because changes in the port number in the config file show up in the output.
I understand that it is unable to open a web browser (this is a web server, so there isn't one), but not why it is telling me to set the open option to false when I've already done it.
Can anyone tell me what is wrong and how I shall be able to use BrowserSync in a headless environment?
Reset to default