firebase - 为云函数设置 Firebase init 目录

标签 firebase terminal google-cloud-functions firebase-tools

我正在尝试设置 Firebase 云功能,但是当我输入 firebase init 时进入终端,它说:

You're about to initialize a Firebase project in this directory: /Users/username`.



如何将文件夹保存在我的项目目录中?我试过...
cd ~/Desktop/MyProject/
firebase init

但它没有用。 Firebase 文档对此不是很清楚。他们只说这...

To initialize your project:

  1. Run firebase login to log in via the browser and authenticate the firebase tool.
  2. Go to your Firebase project directory.
  3. Run firebase init functions.


有任何想法吗?我觉得我错过了一些简单的东西。
谢谢。

最佳答案

我有同样的问题。您所要做的就是:

1) locate the firebase.json file in your /Users/username directory
2) delete that firebase.json file
3) Now run the firebase init command in your new project directory

这对我有用。希望这可以帮助。

关于firebase - 为云函数设置 Firebase init 目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45131558/

相关文章:

imagemagick - 我可以访问 Google Cloud Function 中的 GraphicsMagicks 或 ImageMagicks 吗?

node.js - Firebase Cloud Functions 与 TypeScript : Realtime Database update ends with success but not updates anything, JS 工作正常

javascript - Firebase 出现错误。创建用户失败: First argument must contain the key "password" Angularjs

java - 将 dialogflow 依赖项添加到我的 android 应用程序后出现重复类错误

火力地堡 : Prevent same account on multiple devices

ruby - 无法安装 Homebrew 软件

macos - 在终端中永久设置默认编辑器

firebase - 在 Firebase 云存储中加载预览时出错

c++ - 可以使用 pdcurses 编辑任何 Windows 终端的调色板吗?

python - Google Cloud from_service_account_json 环境变量