Firebase CLI: the following filters were specified but do not match any functions in the project

Multi tool use


Firebase CLI: the following filters were specified but do not match any functions in the project
I use Firebase Cloud Functions
in my project, and I have a plenty of them so when I run the regular firebase deploy
I exceed the quota, so one option is to deploy only the function that was modified by using firebase deploy --only functions:function1
as mentioned in this web page. This method works only with functions that start with: exports.funcName
but when I try to use it with a function like this:
Firebase Cloud Functions
firebase deploy
firebase deploy --only functions:function1
exports.funcName
function doesNotStartWithExports() {
// Does something.
}
It doesn't work. I use firebase deploy --only functions:doesNotStartWithExports
but I get this output:
firebase deploy --only functions:doesNotStartWithExports
⚠ functions: the following filters were specified but do not match any functions in the project: doesNotStartWithExports
The Question: How to deploy Firebase functions that does not start with exports?
1 Answer
1
I actually found the solution, and it's by deploying one of the function that starts with exports
and uses the function that doesn't start with exports
, for example:
exports
exports
function doesNotStartWithExports() {
// I want to deploy only this function but I can't
}
exports.anotherFunction = functions.https.onRequest((request, response) => {
// This functions uses the one that I want to deploy.
doesNotStartWithExports()
})
To update doesNotStartWithExports
I use this command:firebase deploy --only functions:anotherFunction
.
doesNotStartWithExports
firebase deploy --only functions:anotherFunction
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.