firebase deploy --remove functions or hosting
See original GitHub issueOld function sticks in firebase when you rename a function after the first deployment
Deploy this function:
exports.helloFn1 = functions.https.onRequest((request, response) => {
response.send("Hello from Fn1!");
});
call, and then edit the index.js and change it to:
exports.helloFn2 = functions.https.onRequest((request, response) => {
response.send("Hello from Fn2!");
});
firebase deploy --only functions
In the firebase console, both functions is there, with no option to delete it.
You can delete it in the cloud console https://console.cloud.google.com
but admin will be done from the deployment point of view?
Or how is the plan to deploy functions by name from different places?
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (8 by maintainers)
Top Results From Across the Web
Manage functions | Cloud Functions for Firebase - Google
You can deploy, delete, and modify functions using Firebase CLI commands or by setting runtime options in your functions source code.
Read more >Undeploy functions in firebase hosting
Using firebase itself, the only way I am aware of is to deploy an empty/do-nothing function, which will overwrite your existing function(s).
Read more >Solved: Firebase deploy functions fails
Solved: After updating firebase-functions to 4.0.0 or 4.0.1, trying to deploy my functions with the firebase CLI is success.
Read more >When Your Firebase Cloud Functions Don't Want to Deploy ...
You can deploy, delete, and modify functions using Firebase CLI commands or by setting runtime options in your… firebase.google.com.
Read more >Deploy Firebase Functions using GitHub Actions - Dave Sugden
When setting up Firebase Hosting, the Firebase CLI will helpfully ask you if you want to set up automation. It will configure a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Right now there’s a known issue where removing the function from your deployed file(s) (e.g.
index.js
) doesn’t remove the function. See #982 for more details.Short version:
firebase deploy --only functions
will tell you that it will remove functions, but not actually do so. Run this to know what will be removed.firebase deploy --only functions --force
will remove the noted functions, but will not ask for confirmation. This will actually delete the removed (from code) functions.(Be sure you’re on the latest
firebase-tools
as well!)What @mbleigh had meant is that if the functions are no longer in functions/index.js when you deploy (because you deleted or commented out the code), then it will be deleted. If that is not working, then go to https://cloud.google.com/console/functions/list, click on the three dots to right of the function you’d like to delete to expand the menu, then click on “delete”. Please reopen this issue if you’re still experiencing problems.