jovan jovan - 3 months ago 14
Node.js Question

Port still in use after killing npm process?

I had npm running in the background (

nohup npm start &
) but need to restart today.

So I found the npm process using
ps -ef | grep npm
and then used kill to stop it by process ID.

However, My node.js app is still working (even though the npm process is no longer found) and when I try to run
npm start
it says the port is still taken.

Solutions?

Answer

The process you're looking for is node, not npm. npm start calls the script defined in package.json, which is almost always node something.js.