我启动了Firebase FriendlyChat教程,它一直在工作,直到我决定停止firebase serve进程,然后再次启动并停止它,然后当我再次使用firebase serve启动它时,它告诉我端口已经在使用中。
所以我用kill -QUIT <PID>停止了几个进程,当我试图启动它时,它给了我这个错误:
[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.所以我重新启动了我的mac,并再次尝试,但没有成功。然后我决定重新安装firebase和firebase-tool包。但这并不管用。
那么有没有人能帮我,或者有人也有这个问题?
提前谢谢。
西奥
发布于 2016-05-19 06:23:15
我没有修复为什么端口5000被不幸地采用,但作为一种变通方法,您可以这样做:
firebase serve -p 5001在另一个端口上服务。
发布于 2016-05-22 06:53:20
您有没有尝试过将Node升级到6.2.0或降级到稳定的4.4.4?
https://stackoverflow.com/questions/37310968
复制相似问题