Getting an error when deploying firebase with node.js

Viewed 134

I am following the functions tutorial on firebase page to deploy my website on firebase hosting, but it keeps giving me error

Port 9005 is already in use

Error: An unexpected error has occurred.

Logs say this:

Building nodejs source
Could not find functions.yaml. Must use http discovery
Serving at port 9005

FetchError: request to http://localhost:9005/__/quitquitquit failed, reason: connect ECONNREFUSED 127.0.0.1:9005

I tried to do lsof -i tcp:9005 to see what is running on the port, but terminal did not answer with anything(

1 Answers

This issue might be caused if the firebase CLI is not up to date, you can review the current version using firebase --version. If your firebase version is kind of old, you can update it using npm install -g firebase-tools.

Also, you can use the following command: firebase serve --only functions --port=9005, in that way you can change the port you want to use.

Related