johnpapa / lite-server

Lightweight node server
MIT License
2.31k stars 267 forks source link

Don´t open the correct URL when i start the server. #165

Open ghost opened 5 years ago

ghost commented 5 years ago

When I start the server, it opens a wrong URL.

When i run the command to start lite-server, an new page is open. But the URL that appear in browser is incorrect.

The lite-server's log shows:

[1] Did not detect a bs-config.json or bs-config.js override file. Using lite-server defaults... [1] browser-sync config [1] { injectChanges: false, [1] files: [ './*/.{html,htm,css,js}' ], [1] watchOptions: { ignored: 'node_modules' }, [1] server: { baseDir: 'app', middleware: [ [Function], [Function] ] } } [1] [Browsersync] Access URLs: [1] ------------------------------------ [1] Local: http://localhost:3000 [1] External: http://10.80.80.84:3000 [1] ------------------------------------ [1] UI: http://localhost:3001 [1] UI External: http://localhost:3001 [1] ------------------------------------ [1] [Browsersync] Serving files from: app [1] [Browsersync] Watching files... [1] [Browsersync] Reloading Browsers... (buffered 9 events)`

The correct URL should be http://localhost:3000, but what I get is http://localhost/?line=3000&column=0.

Follow the link of my github project, where are the packege.json and tsconfig.json. alurabank

Bug repro steps

  1. My git project, mentioned above, is a project to test my typescript skills. Therefore it is necessary to download it and verify that the package.json file is properly installed.
  2. run the command on the project root folder => npm start
  3. A browser window will be open with the wrong url.

Environment

atharwa-24 commented 4 years ago

same issue