5
3

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 3 years have passed since last update.

Gatsbyのdevelopコマンドした際、「Something is already running at port 8000」と出たときの対処

Posted at

#環境
・OS: macOS 10.15.5
・gatsby: 2.24.14

#事例
何の気なしに「gatsby develop」を実行すると、次のメッセージが表示する。

Something is already running at port 8000
? Would you like to run the app at another port instead? › (Y/n)

Yを選ぶと、port 8001で起動する。
nを選ぶとサーバーを起動せずに終了する。

#対応
8000ポートで使われているプロセスをkillする。

①まずはポートのプロセスを調べる

lsof -i :8000

結果は次の通り。

COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
node    14778 saku   27u  IPv4 0xb6bc7a92d19432ab      0t0  TCP localhost:irdmi (LISTEN)

②プロセスをkillする

kill -9 [PIDの数字]

こーゆーのをさらっと解消できるといいんですが、まだまだです。

5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?