firebase-tools“错误:证书已过期" [英] firebase-tools "Error: certificate has expired"

查看:88
本文介绍了firebase-tools“错误:证书已过期"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天早上,我尝试将我的react项目部署到Firebase托管,但收到此错误:

This morning I tried to deploy my react project to firebase hosting but I received this error:

Error: Server Error. certificate has expired

然后我尝试执行firebase list命令以查看我的项目列表,但再次收到相同的错误!我在其他项目上尝试了相同的结果.因此,我认为此错误与特定项目无关,并且与firebase-tools有关.这是错误日志:

Then I tried to execute firebase list command to see the list of my projects but again I received the same error! I tried it on other projects with the same result. So I believe this error is not related to a specific project and it has something to do with firebase-tools. Here is the error log:

[debug] 
[debug] [2020-01-07T03:37:57.789Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2020-01-07T03:37:57.789Z] > authorizing via signed-in user
[debug] [2020-01-07T03:37:57.792Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects  

[debug] [2020-01-07T03:37:58.566Z] Error: certificate has expired
    at TLSSocket.<anonymous> (_tls_wrap.js:1116:38)
    at emitNone (events.js:106:13)
    at TLSSocket.emit (events.js:208:7)
    at TLSSocket._finishInit (_tls_wrap.js:643:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:473:38)
[error] 
[error] Error: Server Error. certificate has expired

推荐答案

我找到了解决方案.首先,请执行以下操作:

I found the solution. First, do this:

npm i -g firebase-tools@latest

好像我正在使用Firebase CLI的过时版本.发生此错误的原因是,较旧的CLI版本已链接到不再运行的旧版Firebase服务.唯一的解决方案是升级到最新的CLI版本.

It looks like I'm using an outdated version of Firebase CLI. This error happened because the older versions of CLI are linked to legacy Firebase services that are no longer operational. Upgrading to the latest CLI version is the only solution.

然后,您需要使用新命令而不是不推荐使用的命令.例如:

Then you need to use new commands instead of deprecated ones. For example:

firebase projects:list  //instead of firebase list

这篇关于firebase-tools“错误:证书已过期"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆