LoginSignup
1
0

More than 1 year has passed since last update.

[firebase] emulators:startでportエラーが出る

Posted at

firebase emulators:startを打った時に出たエラー

エラー内容

⚠  hosting: Port 5000 is not open on localhost, could not start Hosting Emulator.
⚠  hosting: To select a different host/port, specify that host/port in a firebase.json config file:
      {
        // ...
        "emulators": {
          "hosting": {
            "host": "HOST",
            "port": "PORT"
          }
        }
      }
i  emulators: Shutting down emulators.

portの5000番が使われているらしい。
記憶にないけどチェック。

確かに使われているけどcommplex-mainってなんだ?

$ lsof -i :5000

# ---------------------------------------->
COMMAND   PID   FD   TYPE  SIZE/OFF NODE NAME
ControlCe 397   21u  IPv4  0t0  TCP *:commplex-main (LISTEN)
ControlCe 397   22u  IPv6  0t0  TCP *:commplex-main (LISTEN)

解決

MacをMontereyにバージョンアップした時にAirPlayなる機能が5000番ポートを使っているらしい。
参考:MacをMontereyにアップデートしたらFlaskが5000番ポートで起動できなくなった

何かと5000番使うこと多いので、出くわすことが多そう?

firebaseのエミュレータ自体は5002番にして使えるようになりました!

firebase.json
"emulators": {
    "hosting": {
        "port": 5002
    },
}

1
0
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
1
0