2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Windowsでnodeのプロセス終了させる方法

Last updated at Posted at 2021-12-06

JSフレームワークで「Port 3000 is already in use.」的なエラーが出てしまった時用のショートカット。
検索してもLinaxの解決方法ばかりで、若干探しにくいので備忘録的に書きておきます。

##実行コマンド
コマンドプロンプト等で実行。

//エラーでalreadyになっているポート番号を最後に入れる
netstat -aon | findstr 0.0:3000

//下記は帰ってくる値の例 最後の数値をコピー
//TCP         0.0.0.0:3000           0.0.0.0:0              LISTENING       15856
//先ほど表示された数値を入れて実行
taskkill /pid 15856 /F

###Linaxでの解決方法

lsof -i:3000

//上のやり方と同様に帰ってきた数値を記入 5298部分
kill -9 5298
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?