Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vite server listen on IPv6 only #2032

Closed
3 tasks done
CzBiX opened this issue Feb 15, 2021 · 3 comments · Fixed by #5617
Closed
3 tasks done

vite server listen on IPv6 only #2032

CzBiX opened this issue Feb 15, 2021 · 3 comments · Fixed by #5617

Comments

@CzBiX
Copy link

CzBiX commented Feb 15, 2021

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

vite server listen on IPv6 only.

Reproduction

run vite

System Info

  • vite version: vite/2.0.0-beta.69
  • Operating System: debian 10
  • Node version: node-v12.20.1
  • Package manager (npm/yarn/pnpm) and version:

I tried server.host option, looks like it only changed "Vite dev server running at" tips, server still listen on IPv6.

@yyx990803
Copy link
Member

Hmm, according to Node docs server.listen supports both IPv6 and IPv4 by default.

Unless you want IPv4 only - which the fix allows you to do with host: '0.0.0.0'.

@CzBiX
Copy link
Author

CzBiX commented Feb 15, 2021

I believe you should point to this, which listen to IPv6 and IPv4 by default, but it's ipv6 only in default on Windows.

@yyx990803
Copy link
Member

In most operating systems, listening to the unspecified IPv6 address (::) may cause the net.Server to also listen on the unspecified IPv4 address (0.0.0.0).

It seems it does listen to both in most cases.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants