Kill process running on given port

npx kill-port <port>

This command requires NPM. Calling it with NPX allows the package to execute from within the NPM registry without requiring its installation (locally or globally).

Further reading