You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So this is some weird issue to do with IPv6. On my Mac, localhost resolves to ::1, not 127.0.0.1. With the steps above however, Node is told to listen on 127.0.0.1. That means when I connect to http://localhost:8080/ it doesn't connect.
If I run npx vue-cli-service serve --host ::1 then I can connect to http://localhost:8080/, but now http://127.0.0.1:8080/ does not connect.
"What's the problem?" you might think. "Just use 127.0.0.1 then". Well it is a problem because:
a) vue-cli-service (and maybe webpackdevserver) do all sorts of misguided shenanigans to try and make the URL more "friendly" or something. Honestly I'm not sure what they're trying to do.
b) I'm using electron-builder, which is awesome, but in dev mode it tries to load process.env.WEBPACK_DEV_SERVER_URL, which is set to http://localhost:8080/, which of course doesn't work because it isn't listening on localhost - it's listening on 127.0.0.1.
I think this may be purely a webpack-dev-server problem actually but I'm not 100% sure and I've written all this now...
The text was updated successfully, but these errors were encountered:
Version
3.11.0
Environment info
Steps to reproduce
vue create
. I've selected Typescript and Babel.npx vue-cli-service serve
What is expected?
It connects.
What is actually happening?
It does not connect.
So this is some weird issue to do with IPv6. On my Mac,
localhost
resolves to ::1, not 127.0.0.1. With the steps above however, Node is told to listen on 127.0.0.1. That means when I connect tohttp://localhost:8080/
it doesn't connect.If I run
npx vue-cli-service serve --host ::1
then I can connect tohttp://localhost:8080/
, but nowhttp://127.0.0.1:8080/
does not connect."What's the problem?" you might think. "Just use 127.0.0.1 then". Well it is a problem because:
a) vue-cli-service (and maybe webpackdevserver) do all sorts of misguided shenanigans to try and make the URL more "friendly" or something. Honestly I'm not sure what they're trying to do.
b) I'm using electron-builder, which is awesome, but in dev mode it tries to load
process.env.WEBPACK_DEV_SERVER_URL
, which is set tohttp://localhost:8080/
, which of course doesn't work because it isn't listening onlocalhost
- it's listening on 127.0.0.1.I think this may be purely a webpack-dev-server problem actually but I'm not 100% sure and I've written all this now...
The text was updated successfully, but these errors were encountered: