Skip to content

Commit 6b62b1e

Browse files
wconrad265tlane25
andcommitted
fix: updated port in use error message
Co-authored-by: Thomas Lane <[email protected]>
1 parent 4313041 commit 6b62b1e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/commands/main.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ process.on('uncaughtException', async (err: any) => {
4545

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

0 commit comments

Comments
 (0)