Firebase CLI:指定了以下过滤器,但与项目中的任何功能都不匹配

Ame*_*eel 4 firebase google-cloud-functions firebase-cli

我在我的项目中使用Firebase Cloud Functions,并且我有很多它们,因此当我运行常规时,firebase deploy我超出了配额,因此一种选择是仅部署通过使用此网页firebase deploy --only functions:function1中提到的方式修改的功能。此方法仅适用于以以下开头的函数:但是当我尝试将它与这样的函数一起使用时:exports.funcName

\n\n
function doesNotStartWithExports() {\n    // Does something.\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n

它不起作用。我使用firebase deploy --only functions:doesNotStartWithExports但我得到这个输出:

\n\n
\xe2\x9a\xa0  functions: the following filters were specified but do not match any functions in the project: doesNotStartWithExports\n
Run Code Online (Sandbox Code Playgroud)\n\n

问题:如何部署不以导出开头的 Firebase 函数?

\n

kip*_*ip2 6

我在尝试删除一些已弃用的函数时遇到了非常类似的错误:

\n

firebase functions:delete mymodule-helloWorld --region us-central1

\n

输出:

\n

Error: The specified filters do not match any existing functions in project my-firebase-project.

\n

事实证明,如果我用“.”替换命名空间/分组(模块)函数中的“-”,错误就会消失。诡异的。

\n

firebase functions:delete mymodule.helloWorld --region us-central1

\n

输出:

\n
? You are about to delete the following Cloud Functions:\n    mymodule-helloWorld(us-central1)\n  Are you sure? Yes\ni  functions: deleting function mymodule-helloWorld(us-central1)...\n\xe2\x9c\x94  functions[mymodule-helloWorld(us-central1)]: Successful delete operation.\n
Run Code Online (Sandbox Code Playgroud)\n

该解决方案改编自此github线程

\n