Skip to content

Commit 75e83a4

Browse files
beemanhansl
authored andcommitted
fix(serve): improve error message when port is in use (#4167)
1 parent 23c6c53 commit 75e83a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/angular-cli/commands/serve.run.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ function checkExpressPort(commandOptions: ServeTaskOptions) {
5050
.then((foundPort: number) => {
5151

5252
if (commandOptions.port !== foundPort && commandOptions.port !== 0) {
53-
throw new SilentError(`Port ${commandOptions.port} is already in use.`);
53+
throw new SilentError(
54+
`Port ${commandOptions.port} is already in use. Use '--port' to specify a different port.`
55+
);
5456
}
5557

5658
// otherwise, our found port is good

0 commit comments

Comments
 (0)