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.

Firebase Cloud Functionsで"Error: Could not start Functions Emulator, port taken."の対処法

Posted at

Firebaseでfirebase emulators:startコマンドが失敗するときの対処法について。

tarminal
>firebase emulators:start
i  emulators: Starting emulators: functions, hosting
⚠  hub: emulator hub unable to start on port 4400, starting on 4401 instead.
⚠  emulators: It seems that you are running multiple instances of the emulator suite for project mynarration-20210110. This may result in unexpected behavior.
i  emulators: Shutting down emulators.
i  hub: Stopping emulator hub
⚠  functions: Port 5001 is not open on localhost, could not start Functions Emulator.
⚠  functions: To select a different host/port, specify that host/port in a firebase.json config file:
      {
        // ...
        "emulators": {
          "functions": {
            "host": "HOST",
            "port": "PORT"
          }
        }
      }
i  emulators: Shutting down emulators.

Error: Could not start Functions Emulator, port taken.

ポートがすでに使われていることが原因。
一度killしてプロセスを開放する必要がある。

4400で起動したいがすでに占有されているので下記コマンドでkill

tarminal
lsof -t -i tcp:4400 | xargs kill -9

下記コマンドで起動できるようになった

tarminal
firebase emulators:start
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?