Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase serve not working

I've been migrating to Firebase 3.0, and with the new changes, we have to use firebase serve on the CLI for local development, and I believe this defaults to port 5000. However, after going through the init process, running firebase serve doesn't do anything after "Starting Firebase development server..." even with specifying port 5000. Attempted fixes:

  • Tried with other ports, like 5001
  • Reinstalled Node (4.x and 6.x)
  • Reinstalled NPM
  • Removed firebase-cli (since firebase-tools is now being used)
  • Reinstalled firebase-tools with npm
  • Tweaked firebase init endlessly
  • Tried on different user accounts on my computer
  • Restarted computer
  • Checked that port 5000 was free by $lsof -i tcp:5000
  • Tested address variants like localhost:5000 and like 127.x and 192.x

Here is the debug log:

[debug] ----------------------------------------------------------------------
[debug] Command:      /usr/local/bin/node /usr/local/bin/firebase serve -p 5000 --debug
[debug] CLI Version:  3.0.0
[debug] Platform:     darwin
[debug] Node Version: v6.2.0
[debug] Time:         Sun May 22 2016 01:29:59 GMT+0200 (CEST)
[debug] ----------------------------------------------------------------------
[debug] 
[info] Starting Firebase development server...
[info] 
[info] Project Directory: /Users/user/Documents/localdev/spfwork

Any thoughts on how to fix?

Thank you for your help.

like image 544
user3777933 Avatar asked Dec 15 '22 06:12

user3777933


1 Answers

Fixed - firebase serve from firebase-tools (npm) was missing a logger for some errors, which I added on a pull request here: https://github.com/firebase/firebase-tools/pull/143

My error was that localhost was not starting for some reason, so I changed the command to firebase serve -p 5000 -o 127.0.0.1, and specifying the listen port allowed the server to start successfully.

For reference, the error was Error: getaddrinfo ENOTFOUND localhost

like image 156
user3777933 Avatar answered Dec 28 '22 09:12

user3777933