DF0052: HTTP Server Failed to Listen
Message
Failed to listen on
{host}:{port}:{reason}
Cause
startHttpAndWs tried to bind the HTTP server it owns to host:port and the underlying listen() call failed — most commonly EADDRINUSE (another process, often a previous devframe instance, is already bound to that port) or EACCES (insufficient permissions, typically a privileged port). The WS RPC transport is torn down before this error surfaces, so nothing is leaked.
Example
ts
// A previous instance is still bound to 4096:
// await startHttpAndWs({ context, host: 'localhost', port: 4096 }) → DF0052Fix
- Free the port, or pick another via
--port,cli.port/cli.portRangeon the definition, ordevMiddleware.portonviteDevBridge. - The original node error is available as
error.cause— checkerror.cause.code(e.g.'EADDRINUSE') to branch on the failure kind programmatically.
Source
packages/devframe/src/node/server.ts—startHttpAndWs()throws this when its owned HTTP server'slisten()fails.