port already in use node js

JavaScript
### For Linux/Mac OS search (sudo) run this in the terminal:
$ lsof -i tcp:3000
$ kill -9 PID

### On Windows:
netstat -ano | findstr :3000
tskill typeyourPIDhere 

### change tskill for taskkill in git bash$ lsof -i tcp:3000
$ kill -9 PIDsudo kill -9 $(sudo lsof -t -i:3000)
Source

Also in JavaScript: