1
0

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.

FirebaseError: Port 5000 is not open on localhost, could not start functions emulator.の対処方法

Posted at

#概要

Firebaseを利用してlocalhostでサーバーを立ち上げようとした際に
Error: Port 5000 is not open on localhost, could not start functions emulator.
が発生した場合の対処方法

#結論

firebase serve -p {任意のポート番号}

#詳細

ポートが重複しているエラー。
重複しているポートがkillできない場合、起動コマンドでポートを指定できる。

1.下記コマンドでヘルプを確認
firebase [command] --help

> firebase serve --help
Usage: firebase serve [options]

start a local server for your static assets

Options:
  -p, --port <port>   the port on which to listen (default: 5000) (default: 5000)
  -o, --host <host>   the host on which to listen (default: localhost) (default: "localhost")
  --only <targets>    only serve specified targets (valid targets are: hosting, functions)
  --except <targets>  serve all except specified targets (valid targets are: hosting, functions)
  -h, --help          output usage information

2.-p {任意のポート番号} でポートを指定して立ち上げる。

> firebase serve -p 5001
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?