【发布时间】:2021-02-25 00:43:54
【问题描述】:
我在部署应用程序时遇到问题。
Firebase cli 无法显示项目列表,我收到以下错误:
并在 firebase-debug.log 文件中打印以下信息:
另一个问题是终端出错:
(node:16028) UnhandledPromiseRejectionWarning: FirebaseError: Failed to make request to https://firebase-public.firebaseio.com/cli.json
at Client.<anonymous> (npm\node_modules\firebase-tools\lib\apiv2.js:168:23)
at Generator.throw (<anonymous>)
at rejected (C:\Users\marenas\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:6:65)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:16028) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an
async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16028) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
我已经尝试安装 firebase 工具,也尝试关闭会话并重新打开它,尝试使用 firebase login:ci 的令牌登录,但我无法使用命令列出项目 firebase 项目:列表。
【问题讨论】:
-
CLI 似乎正在尝试从firebase-public.firebaseio.com/cli.json 加载一些配置数据,但无法访问它。你能检查一下你是否可以在浏览器中打开那个 URL(它加载对我来说没有问题)?
-
正确,URL打开成功。
-
嗯……这很有趣。如果您可以在浏览器中打开它,我不知道为什么 CLI 无法打开它。如果您可以重现该问题,可能值得在 Github 上的 firebase-tools 存储库上发布,或 reach out to Firebase support 以获得个性化的故障排除帮助
标签: node.js angular firebase firebase-cli