2

This issue started happening to me about 1 month ago probably after updating my angular version to v5.2.5 from 5.0.

In the past, when I wrote the command ng serve and closed the process with Ctrl + C, the listener on that port stopped as well.

Now, when doing the same process, the process is closed successfully, but when trying to run it again, it keeps telling me that the port is in use.

While executing the command lsof -i:4200 I can clearly see that it keeps the listener even after terminating the process.

Is there a way to fix this? Is it an issue with this version of angular5?

Thanks.

2

1 Answer 1

1

rm -rf node_modules npm i

Fixed the problem.

Sign up to request clarification or add additional context in comments.

1 Comment

Bit odd, but yes, removing node_modules and installing them worked.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.