WebSocket connection to 'ws://procesos-emp.workhub.company/' failed:
setupWebSocket @ client.ts:78
(anonymous) @ client.ts:68
Show 2 more frames
client.ts:78 WebSocket connection to 'ws://localhost:8080/' failed:
setupWebSocket @ client.ts:78
fallback @ client.ts:43
(anonymous) @ client.ts:99
Show 3 more frames
client.ts:48 [vite] failed to connect to websocket.
your current setup:
(browser) my-url/ <--[HTTP]--> localhost:8080/ (server)
(browser) my-url:/ <--[WebSocket (failing)]--> localhost:8080/ (server)
Check out your Vite / network configuration and https://vitejs.dev/config/server-options.html#server-hmr .
And this is my vite config file:
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
test: {
globals: true,
setupFiles: ["./tests/setup.js"],
},
});
I never added a websocket and I keep getting this error.
In dev-tools I found the file that is causing the issue, It is in node modules, called client.ts
Here is the github repo of the exact same file:
https://github.com/vitejs/vite/blob/main/packages/vite/src/client/client.ts