10

I'm using vue-cli in docker, and it's necessary to bind services to the LAN IP, or to 0.0.0.0 in order to access them 'locally'.

I expected --host 0.0.0.0, but that's not there.

$ vue ui 🚀 Starting GUI... 🌠 Ready on http://localhost:8000

$ vue ui -h Usage: ui [options] start and open the vue-cli ui Options: -p, --port <port> Port used for the UI server (by default search for awailable port) -D, --dev Run in dev mode --quiet Don't output starting messages --headless Don't open browser on start and output port -h, --help output usage information

1 Answer 1

14

I'm using Vue.js inside a Vagrant instance for development and had the same issue initially.

It looks like the -H / --host option was added in vue-cli version 3.1.0: https://github.com/vuejs/vue-cli/pull/2568

$ vue --version
3.1.3

$ vue ui -h
Usage: ui [options]

start and open the vue-cli ui

Options:
  -H, --host <host>  Host used for the UI server (default: localhost)
  -p, --port <port>  Port used for the UI server (by default search for available port)
  -D, --dev          Run in dev mode
  --quiet            Don't output starting messages
  --headless         Don't open browser on start and output port
  -h, --help         output usage information

$ vue ui -H 0.0.0.0
🚀  Starting GUI...
🌠  Ready on http://0.0.0.0:8000

This solved my issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.