angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Port 4200 is already in use

Open mInzamamMalik opened this issue 9 years ago • 25 comments

it should automatic shift on other port if a port is busy, currently when i try to serve two projects at a time i always get error:

Port 4200 is already in use

Thank You, M.Inzamam Malik

mInzamamMalik avatar Jan 24 '17 13:01 mInzamamMalik

Just enter this below command line in your new app for simultaneously run two app at a time.

ng serve --port 4401

@ALYPAKISTAN

ghost avatar Jun 08 '19 20:06 ghost

I also faced this problem suddenly and solved it by deleting node_modules folder and package-lock.json and again doing npm install.

something changed in package-lock.json caused this problem to me

lokisanhitleson avatar Aug 18 '19 12:08 lokisanhitleson

I also faced this problem suddenly and solved it by deleting node_modules folder and package-lock.json and again doing npm install.

something changed in package-lock.json caused this problem to me

Yes, Finally it works. Thank you for your solution. I wasted two days on it.

hadideveloper avatar Aug 20 '19 07:08 hadideveloper

I solved this problem with yarn.

  1. Delete package-lock.json & node_modules folder
  2. Install yarn package manager
  3. yarn install.
  4. ng serve - runs goooood.

bboyzplatform avatar Aug 20 '19 10:08 bboyzplatform

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.