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

Created on 25 Apr 2020  路  7Comments  路  Source: firebase/firebase-functions

Related issues

Version info

node: 12.16.0

firebase-functions: 3.6.0

firebase-tools: 8.1.1

firebase-admin: 8.10.0

Test case

firebase deploy --only functions:myFunction doesn't find the function in the index file and thus doesn't deploy it without throwing any error.

Steps to reproduce

init firebase function in a new project
Made a test deploy of the template "helloWorld" function and it deploys correctly and works correctly. Made another function "myFunction" and tried to deploy it but got the message
"! functions: the following filters were specified but do not match any functions in the project: myFunction"
Tried to swap names between the two Functions and it deploys correctly. Long story short i'm apparently able to deploy only a function name helloWorld

Expected behavior


should be able to deploy functions with any name, not only helloWorld...as i said the project already has other functions properly deployed

Actual behavior

This is the output if i try to deploy the template function after adding an "y" to the end just to change the name

  • functions: Finished running predeploy script.
    i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
  • functions: required API cloudfunctions.googleapis.com is enabled
    i functions: preparing functions directory for uploading...
    i functions: packaged functions (36.28 KB) for uploading
  • functions: functions folder uploaded successfully
    i functions: current functions in project: cleanUpConversionStatus(us-central1), cleanUpUploadStatus(us-central1), copyVideoToFirestore(us-central1), deleteVideoInFirestore(us-central1),
    editVideoInFirestore(us-central1), everyFiveMinutes(us-central1), everyMinute(us-central1), everyTwoHours(us-central1), everyWeek(us-central1), generateThumbs(us-central1), helloWorld(us-central1), imageToJPG(us-central1), onBonusAdded(us-central1), onBonusUpdated(us-central1), onProducerAdded(us-central1), onSlotAdded(us-central1), onSlotUpdated(us-central1), sendInstantNotification(us-central1), sendInstantReplyNotificationFromAdmin(us-central1), sendMailFromAdmin(us-central1), sendNewVideoNotification(us-central1), sendVideoCollectionToAlgolia(us-central1), updateAlgoliaIndex(us-central1)
    ! functions: the following filters were specified but do not match any functions in the project: helloWorldy
  • scheduler: required API cloudscheduler.googleapis.com is enabled

Were you able to successfully deploy your functions?


No

Author Feedback closed-by-bot no-recent-activity

Most helpful comment

@gillern You have to use dots to specify sub groups 馃槉
firebase deploy --only functions:Obby.GetObby

Here I found the solution: https://stackoverflow.com/a/43998935

All 7 comments

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Could you rerun firebase deploy --only functions:myFunction --debug of the function that is failing and post the output here?

Also, I see that you're deploying a scheduled function - is that the function that is failing?


Hey @davidevaliante. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!


Since there haven't been any recent updates here, I am going to close this issue.

@davidevaliante if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

Capture

Happens when I do this:

//index.js
const functions = require("firebase-functions");

exports.Obby = require("./Obby.js");

// ./Obby.js
const functions = require("firebase-functions");

exports.GetObby = functions.https.onRequest((request, response) => {

});

Make sure your are building the functions project before deploying
"build": 'tsc'

@gillern You have to use dots to specify sub groups 馃槉
firebase deploy --only functions:Obby.GetObby

Here I found the solution: https://stackoverflow.com/a/43998935

Was this page helpful?
0 / 5 - 0 ratings