Three js, and vite

Hi so I have my project all set up and its all working good sockets including with nodejs
but now I am ready to install vite so i can bundle my code …
So here’s is where i am up to i’ve installed vite i can put npm run dev
it loads but then the socket times out with:

WebSocket connection to ‘ws://localhost:3000/’ failed: WebSocket is closed before the connection is established.

this didn’t happen before installing vite
my socket is on port 3000 and so it vite i had to tell vite which port though as it runs on port 1573 normally
anyway its a three file that is timing out by the looks of things as my console says this:

any idea’s?