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.
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)
(not related to this general issue with outdated opn)
PR available: https://github.com/BrowserSync/browser-sync/pull/1582
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.
Most helpful comment
yeah I'll get a release out in the next few hours