Skip to content

Commit ba90924

Browse files
beemanMRHarrison
authored andcommitted
fix(serve): improve error message when port is in use (angular#4167)
1 parent f9dc330 commit ba90924

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)