-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
dev server host 0.0.0.0 not available with Docker (Windows WSL) #12995
Comments
This isn't a nuxt issue. |
This is somewhat related to Nuxt issue. Perhaps not a bug but likely to do with how vite handles connections. |
@Hemric Did you figure out this one? Appreciate any pointer. |
Found the root cause. A bug in nuxi dev that caused server only binds to localhost regardless of the host value. |
Environment
Operating System: Windows 10 / WSL 2 - Ubuntu 20.04
Node Version: v16.13.0
Nuxt Version: 3.0.0-27296172.f5307f9
Package Manager: yarn@1.22.15
Bundler: Vite
User Config: css, vite, typescript
Runtime Modules: -
Build Modules: -
Reproduction
Bug
I'm trying to start the dev server with nuxi dev --port 4000 --host 0.0.0.0 to have a docker container accessing it.
I'm supposed to get the page content, i get a network error instead. This bug only occurs in windows wsl not with linux
Additional context
I need this to work for our local dev environment that includes several nuxt app behind a nginx reverse proxy using https in a docker container.
On linux it's working properly but not with windows wsl 2.
It worked with webpack dev server in nuxt 2.
Logs
curl: (7) Failed to connect to host.docker.internal port 4000 after 2024 ms: Connection refused
The text was updated successfully, but these errors were encountered: