Skip to content

Commit

Permalink
fix: updated port in use error message
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Lane <[email protected]>
  • Loading branch information
wconrad265 and tlane25 committed Oct 18, 2024
1 parent 4313041 commit 6b62b1e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/commands/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ process.on('uncaughtException', async (err: any) => {

if (err.code === 'EADDRINUSE') {
error(
`${chalk.red(
`Port ${err.port} is already in use.\n`,
)}\n This could be due to one of your serverless functions intializing a server to listen on a specific port\n` +
'without closing the port.\n',
`${chalk.red(`Port ${err.port} is already in use`)}\n\n` +
`This could be due to one of your serverless functions initializing a server\n` +
`to listen on port ${err.port} without properly closing it.\n\n` +
`To resolve this issue, try the following:\n` +
`1. Check if any other applications are using port ${err.port}\n` +
`2. Review your serverless functions for any lingering server connections\n`,
{ exit: false },
)
} else {
Expand Down

0 comments on commit 6b62b1e

Please sign in to comment.