无法从文件读取凭据

无法从文件读取凭据

本文介绍了Firebase Cloud功能:无法从文件读取凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于新的Firebase Cloud Functions(版本> 1.0).我只需要打电话

Due to new Firebase Cloud Functions (version > 1.0). I only need to call

admin.initializeApp();

没有任何参数.

但是,当我这样做时,然后运行firebase deploy --only函数,就会发生此错误:

However when I did like that then run firebase deploy --only functions , this error occurred :

推荐答案

我发现问题是我定义了GOOGLE_APPLICATION_CREDENTIALS环境变量,该变量指向不存在的json文件,而且我早已删除.

I found out the issue was that i had GOOGLE_APPLICATION_CREDENTIALS environment variable defined which was pointing to json file which did not exist and i had long deleted.

我删除了GOOGLE_APPLICATION_CREDENTIALS环境变量.重新启动终端,然后进行Firebase部署-只有功能完美无缺.

I deleted the GOOGLE_APPLICATION_CREDENTIALS env variable. Restarted the terminal and then firebase deploy --only functions worked flawlessly.

这篇关于Firebase Cloud功能:无法从文件读取凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 15:21