【发布时间】:2021-10-01 17:28:59
【问题描述】:
我正在尝试从 firebase 函数中的 firebase 工具节点模块调用导出方法。
await firebase_tools.auth.export(tempLocalFile);
但我收到以下错误
FirebaseError: No currently active project.
To run this command, you need to specify a project. You have two options:
- Run this command with [1m--project <alias_or_project_id>[22m.
- Set an active project by running [1mfirebase use --add[22m, then rerun this command.
To list all the Firebase projects to which you have access, run [1mfirebase projects:list[22m.
To learn about active projects for the CLI, visit https://firebase.google.com/docs/cli#project_aliases
有没有办法在nodejs云功能中设置活动项目?
编辑
我正在像这样初始化对象
const firebase_tools = require('firebase-tools');
【问题讨论】:
-
你是想在一个云函数中使用多个 Firebase 项目还是什么?
-
不只是部署到的那个
标签: node.js firebase google-cloud-functions firebase-tools