Skip to content

browser-sync start --open does not work with URL #1982

Open
@xgqfrms

Description

@xgqfrms

Issue details

browser-sync start --open does not work with URL

# Choose which URL is auto-opened (local, external or tunnel), or provide a url
$ browser-sync start --open 'http://localhost:3000/public/index.html' --server --files './**/*.*'

https://browsersync.io/docs/command-line

Steps to reproduce/test case

  1. create a new node.js project, with a public folder and index.html file
  2. run npm script
# Choose which URL is auto-opened (local, external or tunnel), or provide a url
$ browser-sync start --open 'http://localhost:3000/public/index.html' --server --files './**/*.*'

opened http://localhost:3000/

wanted http://localhost:3000/public/index.html

image

image

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

  • Browsersync [ 2.26.7 ]
  • Node [ 18.12.0 ]
  • Npm [ 8.19.2 ]
$ browser-sync --version
# 2.26.7

$ node -v
# v18.12.0

$ npm -v
# 8.19.2

Affected platforms

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

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

If CLI, please paste the entire command below

# Choose which URL is auto-opened (local, external or tunnel), or provide a url
$ browser-sync start --open 'http://localhost:3000/public/index.html' --server --files './**/*.*'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions