Skip to content

"Port 4200 is already in use" when running the ng serve command #24881

Description

@danielehrhardt

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

  • run ng serve
  • kill ng serve with cmd + c
  • run ng serve again
  • ➤ Port 4200 is already in use
  • tmp fix: sudo kill $(sudo lsof -t -i:4200)

i had this already some years ago and now again
node -v
v18.12.1
npm -v
8.19.2

MacOS 13.2.1 (22D68)

Minimal Reproduction

Exception or Error

-

Your Environment

Angular CLI: 15.2.4
Node: 18.12.1
Package Manager: yarn 1.22.19
OS: darwin arm64
Angular: 15.2.3
... animations, cdk, common, compiler, compiler-cli, core, forms
... google-maps, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1502.4
@angular-devkit/build-angular 15.2.4
@angular-devkit/core 15.2.4
@angular-devkit/schematics 14.0.6
@angular/cli 15.2.4
@schematics/angular 15.2.4
rxjs 7.8.0
typescript 5.0.2

Anything else relevant?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions