How to kill locked Node process in WSL

Viewed 893

Running my web application in WSL is occasionally getting stuck, I am able to close the script. But the process in the background is stuck and has my files locked.

Detailed info

The Web application is running with webpack dev server listening on changes in the code. When doing git operations, sometimes the files are locked and I cannot perform changes.

I can see the process by running

$ps aux

enter image description here The process is taking a lot of memory. I tried killing the process with

$kill -9 604
$pkill -f node
$kill -SIGKILL 604

But none of them works

I even try to kill the process from Task Manager but its still there.

(Windows Subsystem for Linux running on Windows 10)

1 Answers

Hello same problem on win11

sudo kill -9 2769
mike      2769  1.5  5.7 13169872 1914268 ?    Z    11:54   7:42 /home/mike/.nvm/versions/node/v14.17.4/bin/node /mnt/d/dev/repo/mikecodeur/react-course-app/example/react-fundamentals/node_modules/react-scripts/scripts/start.js
mike      2907  0.1  0.0      0     0 ?        Z    11:54   0:36 [node] <defunct>

Related