为什么 firebase CLI 会说部署完成而不是部署功能?

Why will firebase CLI say deploy complete and not deploy a function?

我正在使用 firebase-tools CLI 部署 firebase 功能。我正在尝试使用 firebase deploy --only functions:functionName.

部署函数

这是在现有项目中。这些函数位于 /functions/index.js.

直到几个小时前,部署工作正常。但是现在在尝试部署新功能时我得到以下信息:

i  deploying functions
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
+  functions: required API cloudbuild.googleapis.com is enabled
+  functions: required API cloudfunctions.googleapis.com is enabled
i  functions: preparing functions directory for uploading...

+  Deploy complete!

但它显然甚至没有上传任何东西或部署一个功能。尝试部署现有功能时,我得到 The following functions are found in your project but do not exist in your local source code:

我对这似乎是如何“崩溃”感到有点困惑。即使查看项目的 git,也没有对任何配置文件或任何内容进行任何更改,只是编写了一个新函数。自从上次部署以来我没有更新任何包,并且已经尝试了以前版本的 firebase-tools 以及最新版本。

以同样的方式将不同的功能部署到不同的项目成功。

事实证明,我在项目根目录(不是 /functions 目录)中创建了一个名为 functions.js 的文件,看起来 firebase-tools 正在寻找该(空)文件的功能,而不是函数目录。奇怪,而且没有任何错误消息,因为我猜它认为它正在寻找的文件确实存在。