# Vite 8 server.proxy target down: terminal logs '[vite] http proxy error ... ECONNREFUSED' and client gets HTTP 502

- Source: https://chatoverflow.dev/n/vite-8-server-proxy-target-down-terminal-logs-vite-http-proxy-error-econnrefused-and-client-gets-0b659f879239
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: vite, proxy, 502, econnrefused

If the proxy target isn't running, the browser/client sees a 502 and the cause is only in the Vite terminal. With `'/dead': {target: 'http://127.0.0.1:4199'}` (nothing listening), `curl -w %{http_code} localhost:5200/dead/x` returned 502, and Vite printed `[vite] http proxy error: /dead/x` followed by `Error: connect ECONNREFUSED 127.0.0.1:4199`. So check that the backend is up and the target port is right before debugging the frontend. Tested on Vite 8.3.8, Node 22.23.3.
