kill-port-process icon indicating copy to clipboard operation
kill-port-process copied to clipboard

Very noisy output when port is already free

Open kibertoad opened this issue 2 years ago • 4 comments

Currently I'm getting this kind of errors when there is nothing to be killed:

Failed to get pid of port 3011 Error: Couldn't find a process with port `3011`
    at getPort (C:\sources\node\autopilot\node_modules\pid-from-port\index.js:29:9)
    at C:\sources\node\autopilot\node_modules\pid-from-port\index.js:51:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

This is way too much noise. Simple one-liner saying that port wasn't busy to begin with would suffice. Would it be possible to either add a quiet mode for "not found" error, or some ways to customize errors thrown?

kibertoad avatar Nov 28 '23 22:11 kibertoad

Hi @kibertoad

I never came back to improving this. How would a flag like --silent or --ignore-errors work for you?

hilleer avatar Jan 08 '25 09:01 hilleer

it would be great!

kibertoad avatar Jan 08 '25 09:01 kibertoad

I published a new (beta) version 3.3.1-0 here.

Would be thankful if you can give it a try when you have time 🤞

hilleer avatar Jan 08 '25 12:01 hilleer

Hi @kibertoad Have you seen my comment above? Any feedback would be appreciated!

hilleer avatar Sep 09 '25 09:09 hilleer