Help us understand the problem. What is going on with this article?

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

環境

・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の数字]

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

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした