You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the websocket port that is used during development is used, the server logs should log the PORT used at a minimum & ideally also the PID associated with the occupied TCP server port.
🟡 Instead of this:
> dev
> node ./server.js
WebSocket server error: Port is already in use
Express server listening at http://localhost:3000
🫡 something like this
> dev
> node ./server.js
WebSocket server error:
tried to initiate web socket on localhost://{PORT_VALUE} for your local development server, but it is already in use.
PID associated with localhost://{PORT_VALUE} is: PID_NUMBER
Another DX improvement:
If the web socket port is used, and the dev server defaults to choosing another open TCP port, we should also log that to the terminal during server start up time
Related commands (mac/linux):
# find process ID associated with TCP port 3000
lsof -t -i:3000
# find and kill process ID associated with TCP port 3000
lsof -t -i:3000 && kill -9 $( lsof -i:3000 -t )
Actual Behavior
Remix dev server tells user that web socket port is occupied but does not specify which one.
I had to dig into the remix codebase to find out (at this time of writing) that websocket port defaults to8002
The text was updated successfully, but these errors were encountered:
This is not a bug perhaps but more of a DX improvement;
Ever since I've used remix (almost 2 years) I've ran into this situation a few times where the dev server's web socket is occupied (either by another remix app , etc) and finding what was occupying the port and killing the process has been a bit of a PITA 😅
Logging the used port and PIDs associated with the server(s) woulkd help the DX a lot
Looks like you are using Vite, but <LiveReload /> is no longer intended to be compatible with the Remix Vite plugin. You can actually see the warning at the top of the screenshot you shared. Check out the v2.6.0 changelog for more info.
Reproduction
Start remix app1 in terminal tab 1
Start remix app2 in terminal tab 2
Create remix app with CLI two times:
If the websocket port that is used during development is used, the server logs should log the PORT & PID associated with the occupied server port.
If remix ends up choosing another web socket port to use, also log that to the console
System Info
Used Package Manager
npm
Expected Behavior
If the websocket port that is used during development is used, the server logs should log the PORT used at a minimum & ideally also the PID associated with the occupied TCP server port.
🟡 Instead of this:
🫡 something like this
Another DX improvement:
If the web socket port is used, and the dev server defaults to choosing another open TCP port, we should also log that to the terminal during server start up time
Related commands (mac/linux):
Actual Behavior
Remix dev server tells user that web socket port is occupied but does not specify which one.
I had to dig into the remix codebase to find out (at this time of writing) that websocket port defaults to
8002
The text was updated successfully, but these errors were encountered: