问题
I have a firebase project with multiple functions deployed. Is it possible to remove all the functions in a single go through the CLI?
I tried the command firebase functions:delete --region us-central1
and the error output was Error: Must supply at least function or group name.
As of right now, I deleted all of them specifying each of their names as such:
firebase functions:delete function1 function2 ...functionN
but this is very cumbersome.
The version of firebase-tools installed is v4.0.0
回答1:
Sign in to your Google Cloud Console at https://console.cloud.google.com, select your project, then from the list on the left pick Cloud Functions. When you get the list of functions, click the check box on the header line to select all, then the Delete button in the tool bar.
Update for comment:
I don't know what the product strategy for Firebase Console is with regard to Cloud Functions. My guess is that it is intended to provide a simplified, more convenient interface for managing Firebase related cloud functions. The Google Cloud Console provides a richer set of capabilities for managing functions and viewing logs. You could submit a feature request to Firebase to get those capabilities added to the Firebase console. Some details on the Firebase/Google Cloud relationship are provided at these links:
https://stackoverflow.com/a/42859932/4815718
https://cloud.google.com/functions/docs/concepts/functions-and-firebase
回答2:
Just comment (or delete) all the functions in your index.js file and redeploy it through the CLI.
回答3:
Now you can simply delete a function from the function dashboard as follows. Click on the three dots mark of relevant function in the right side corner.
来源:https://stackoverflow.com/questions/51558824/delete-all-firebase-functions