How can I delete a Firebase Cloud Function which deployed with Deploy Error: undefined?
Steps to reproduce my problem:
1) Create a new Firebase project
2) $ firebase init and setup functions
3) Paste the following code into functions/index.js
"use strict";
const functions = require('firebase-functions');
function aFunction() {
return 'reports/posts';
}
function getCorruptTrigger() {
return '/reports/posts/' + aFunction +'/createdAt'
}
exports.thisFnWillFailToDeploy = functions
.database
.ref(getCorruptTrigger())
.onWrite(event => {});
4) firebase deploy --only functions
5) The function will fail to deploy as expected.
What I tried to delete the Cloud Function:
- Removing the function from the
index.jsand deploying does not delete the function, instead I getfunctions[thisFnWillFailToDeploy]: Deploy Error: undefined - Deleting the Cloud Function in the Google Cloud Console does not delete the function. (I get a toast saying that the function will be deleted, but this is not the case. In the logs there is an Error with
"status":{"code":13}) - Creating an empty cloud function with the name
thisFnWillFailToDeployalso results inDeploy Error: undefined