Error AtlasError Documentation and Resolution

Vite does not work through VS Code Dev Container port forwarding

Dev Containers / VS Code Port Forwarding

Vite can appear unreachable inside a VS Code Dev Container or forwarded environment when the server host configuration does not match what the port-forwarding feature supports.

Dev Containers / VS Code Port Forwardingdevelopment servers
Dev Containers / VS Code Port Forwarding
  • The Vite dev server is bound to an address that VS Code port forwarding does not handle correctly.
  • The forwarded environment does not support IPv6 for this connection path.
  • The container or remote environment is exposing the wrong host interface.
  1. Set server.host to 127.0.0.1 in the Vite config and restart the dev server.
  2. Retest the forwarded port from VS Code after the host binding change.
  3. Check that the forwarded port matches the actual Vite server port and is not being remapped incorrectly.
Vite: Troubleshooting
Vite VS Code Dev Container port forwarding not working | Error Atlas