Browser-sync: Update opn for WSL/Bash on Windows support

Created on 6 Jul 2018  路  7Comments  路  Source: BrowserSync/browser-sync

Issue details

opn is required with 4.0.2 by browser-sync (used for opening the browser automatically).
However, this version doesn't work in WSL/Bash on Windows. The latest version works correctly in WSL/Bash on Windows. It would be nice if browser-sync could update opn to its recent release version 5.3.0.

Steps to reproduce/test case

Start browser-sync. Notice this warning:
[Browsersync] Couldn't open browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false)

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

  • Browsersync [2.23.6]
  • Node [v8.11.3]
  • Npm [5.6.0]

Affected platforms

  • [ ] linux
  • [x] windows
  • [x] other: (Windows) WSL/Bash on Windows
  • [ ] OS X
  • [ ] freebsd
  • [ ] solaris

Browsersync use-case

  • [ ] API
  • [ ] Gulp
  • [ ] Grunt
  • [ ] CLI
  • [x] webpack

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

(not related to this general issue with outdated opn)

Most helpful comment

yeah I'll get a release out in the next few hours

All 7 comments

I guess, similar issue with my git bash --version 2.18.0.windows.1 Issue

You can use special BS version with updated opn package
Here is the GitHub repo: https://github.com/Kurzdor/browser-sync
And here is the npm package page: https://www.npmjs.com/package/browser-sync-wsl
Tested it on my machine, works greatly.
I will delete this BS version when devs will fix this issue.
Thanks a lot!

Thanks for doing this issue & PR @strarsis !!

This is so minor but so huge 馃憦

@shakyShane: Awesome! Could a new release be
published to npm so I can update browser-sync in the projects?

yeah I'll get a release out in the next few hours

Hi, where do I set the browser path? Same issue with browsersync 2.26.7

EDIT: not browsersyncs issue. the WSL distro I was using didn't have /mnt/c in the path, so it wouldn't open a browser. added the path and works fine.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Zver64 picture Zver64  路  3Comments

Hurtak picture Hurtak  路  3Comments

ericmorand picture ericmorand  路  3Comments

ronilaukkarinen picture ronilaukkarinen  路  4Comments

tonyoconnell picture tonyoconnell  路  3Comments