0

After doing all the clean up I could find, I am still encountering this error below.

I have seen the posts that say to stop other node processes that might be running. I have done that, but still get this error.

From what I can tell, it's actually related to the server start .. where I'm guessing node is trying to start the service twice .. ?

Good news is it's nonfatal, and local server will run. Just asking here in case others are encountering this as well. Thanks

i  functions: Preparing to emulate functions.
    error: restPort (5002) is already in use
error: SUPERVISOR error Error: listen EADDRINUSE 127.0.0.1:5001
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1271:14)
at listen (net.js:1307:10)
at net.js:1417:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10)
error: supervisorPort (5001) is already in use
Gene Bo
  • 11,284
  • 8
  • 90
  • 137
  • 1
    What happens if you restart your machine? – Doug Stevenson Nov 16 '18 at 20:27
  • That did the trick. After restart I tested it across 3 different firebase webApp projects, and all started w/out any error output. Nice - thank you – Gene Bo Nov 16 '18 at 21:52
  • So, you did have some process back there listening on port 5001 (probably an emulator), that you just weren't able to find it when you looked. Rebooting reset everything. – Doug Stevenson Nov 16 '18 at 21:56
  • Basically - starting from yesterday, all of my firebase webApps were crashing on `firebase serve` start. I think I am not yet well versed enough in proper local env. npm/nodeJS cfg. The only thing that finally fixed those crashes was starting a fresh project via new directory and `firebase init`, and from there carefully adding back in my existing code w/out disrupting or otherwise upsetting the setup under /functions/node_modules . For example, one error message I keep seeing when things go awry is that emulator logs couldn't be written to. I can recreate it and dig that up if you'd like. – Gene Bo Nov 16 '18 at 23:07
  • Now I start the server with `sudo firebase serve` and using that helped w/getting back to stable working server start & run. thanks to: https://stackoverflow.com/a/53063495/2162226 – Gene Bo Nov 16 '18 at 23:11

0 Answers0