I'm trying to deploy a Cloud Function for my Firebase project. It says that the deploy was successful but it never uploads nor appears in my Functions dashboard.
This is the log of the firebase deploy --only functions
command:
=== Deploying to 'XXXXXXXXX'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
> functions@ lint C:\Users\XXXXXX\CloudFunctions\functions
> eslint .
+ 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...
+ Deploy complete!
Project Console: https://console.firebase.google.com/project/XXXXXX/overview
I've tried several times, but it never seems to work. Could somebody please help me fix this? I've been trying for days...
The output of the CLI here does not show that you've actually deployed any functions. Or, in other words, the output shows the you deployed 0 functions. I would expect to see the names of the individual deployed functions in the output. If you don't see the names of the functions here, that means you haven't actually exported them from your index.js. And without seeing your code, we can't know that you've done that correctly. You will need to review your code and make sure you have exported at least one function correctly using the Firebase SDK to define it.