kriasoft / react-starter-kit

The web's most popular Jamstack front-end template (boilerplate) for building web applications with React
https://reactstarter.com
MIT License
22.61k stars 4.15k forks source link

Network: use --host to expose #2023

Closed mwaqashameed closed 1 year ago

mwaqashameed commented 1 year ago

When I try to run with "yarn start" it is giving following error. ➜ Local: http://localhost:5173/ ➜ Network: use --host to expose

can you help me out ? Thanks,

koistya commented 1 year ago

It's not an error. That's how Vite launches the app and shows the URL. You're expected to open that URL in the browser.

Note, yarn start is a shortcut for the yarn workspace app dev Vite command. You can check the full list of Vite CLI options like this:

$ yarn workspace app vite --help

For example, you can launch the app and make it open the browser by adding --open CLI argument:

$ yarn workspace app vite dev --open

https://vitejs.dev/guide/cli.html