【问题标题】:"Error: Server Error. socket hang up" whenever I do "firebase deploy --only hosting, database, storage"每当我执行“firebase deploy --only hosting, database, storage”时,都会出现“错误:服务器错误。套接字挂断”
【发布时间】:2019-05-16 09:09:50
【问题描述】:

我目前正在使用 Firebase 的托管、功能、存储和数据库。正确设置所有 firebase.json 后,每当我尝试将它们部署到我在 firebase 上的项目时,都会不断出现此错误。

firebase.json 状况良好。 我只是按照 firebase 文档提供的说明进行操作。 我尝试为我的 CLI 卸载并重新安装“firebase-tools”npm。 我已经在stackoverflow中检查了所有答案,但似乎没有正确答案。

firebase login
firebase list
firebase use 'myprojectid'
firebase deploy --only database, functions, storage, hosting

我希望它能够正常工作,从而使所有事物都脱离现实。 但是我得到了这个“socket hang up”错误。

【问题讨论】:

标签: firebase firebase-tools


【解决方案1】:

我在“firebase-tools”GitHub 存储库上打开了这个问题。感谢“thechenky”,我抓住了解决这个问题的线索。问题是“.firebaserc”设置。我的项目的配置不正确,如下所示:

{
  "projects": {
    "default": "gobot-a5af4",
    "dev": "gobot-a5af4",
    "prod": "gobot-3e82e",
    "mu": "gobot-multiuser"
  }
} 

所以,每当我部署我的功能、存储、数据库和托管时,我都会无意识地暗示“默认”错误的 projectID。 可以查看链接:https://github.com/firebase/firebase-tools/issues/1309

【讨论】:

    猜你喜欢
    • 2019-03-30
    • 2019-04-10
    • 2023-03-28
    • 2021-01-13
    • 2021-05-12
    • 1970-01-01
    • 2020-01-04
    • 1970-01-01
    相关资源
    最近更新 更多