Dirk
Dirk

Reputation: 3391

Firebase - serve error

I started the Firebase FriendlyChat tutorial, and it worked until I decided to stop the firebase serve process, and started it again and stoped it, and then when I started it with firebase serve again it said the port was already in use.

So I stopped a few processes with kill -QUIT <PID> and when I tried to start it gave me this error:

[debug] Command:      /usr/local/bin/node /usr/local/bin/firebase serve
[debug] CLI Version:  3.0.0
[debug] Platform:     darwin
[debug] Node Version: v5.9.1
[debug] Time:         Thu May 19 2016 00:03:54 GMT+0200 (CEST)
[debug] ---------------------------------------------------------------    
[debug] 
[info] Starting Firebase development server...
[info] 
[info] Project Directory: /Applications/MAMP/htdocs/firebase/chat/web-start
[warn] ⚠  Port 5000 is not available. Trying another port...
[warn] ⚠  Port 5001 is not available. Trying another port...
[debug] TypeError: Cannot read property 'public' of undefined
at Server.<anonymous> (/usr/local/lib/node_modules/firebase-tools/commands/serve.js:24:15)
at Server.g (events.js:273:16)
at emitNone (events.js:80:13)
at Server.emit (events.js:179:7)
at emitListeningNT (net.js:1260:10)
at _combinedTickCallback (node.js:380:13)
at process._tickCallback (node.js:407:11)
[error] 
[error] Error: An unexpected error has occurred.

So I restarted my mac and tried it again without success. Then I decided to reinstall the firebase and firebase-tool package. But that didn't work.

So can anyone help me, or did someone had this problem too?

Thanks in advance.

Theo

Upvotes: 0

Views: 2110

Answers (2)

user3777933
user3777933

Reputation: 424

Have you tried updating Node to 6.2.0 or downgrading to stable 4.4.4?

https://nodejs.org/en/

Upvotes: 0

Ian Barber
Ian Barber

Reputation: 19960

I don't have a fix for why port 5000 is taken unfortunately, but as a workaround you can do:

firebase serve -p 5001

To serve on another port.

Upvotes: 1

Related Questions