最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - possible "pkill -f node" alternative on windows - Stack Overflow

programmeradmin1浏览0评论

I am currently trying to fix:

[nodemon] app crashed - waiting for file changes before starting...

One solution was to run pkill -f node but that is a macOS-specific thing. Any suggestions?

I am currently trying to fix:

[nodemon] app crashed - waiting for file changes before starting...

One solution was to run pkill -f node but that is a macOS-specific thing. Any suggestions?

Share Improve this question edited Aug 29, 2021 at 20:09 jonrsharpe 122k30 gold badges268 silver badges476 bronze badges asked Aug 29, 2021 at 16:41 Mad_MaxMad_Max 511 silver badge6 bronze badges 8
  • 1 I assume "pkill" is a "process kill" mand, the windows equivalent would be taskkill -f -im "node.exe", assuming node.exe is the process you want to kill. – 404 Commented Aug 29, 2021 at 16:44
  • 1 @404 The difference is that pkill kills any processes that contain a certain phrase. For example pkill a would kill all of the imaginary processes apple, banana and carrot. – lejlun Commented Aug 29, 2021 at 16:49
  • 1 Ok, in that case taskkill -f -im "node*". Can't start with a wildcard though. – 404 Commented Aug 29, 2021 at 16:51
  • 1 @404 when I try both of your solutions the error message "ERROR: The process "node*" not found." pops up. I have node downloaded, set up and everything. Any suggestions? Thank you – Mad_Max Commented Aug 29, 2021 at 19:34
  • 1 What do you mean fix it? That suggests your app has the problem, why does a process need killing? – jonrsharpe Commented Aug 29, 2021 at 20:10
 |  Show 3 more ments

1 Answer 1

Reset to default 6

You can use taskkill as suggested in the ments. Use an asterisk for a partial name of a process. For example, to kill all python scripts:

taskkill -f -im python*

And in your case, the solution can look like:

taskkill -f -im node*

发布评论

评论列表(0)

  1. 暂无评论