Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CLI question: "The following functions are found in your project but do not exist in your local source code" - how to default answer No?

Everytime I deploy a function, I have the annoyance that I need to answer the question:

The following functions are found in your project but do not exist in your local source code

with "No".

I have the following structure of my functions. I have a folder with the Typescript functions and then a different folder with the Javascript functions. They are in separate folders, because I am too dumb to get it to work in the same folder.

I initially created both folders using the Firebase CLI and choosing Typescript and Javascript respectively.

I am aware of the --force operator, but I think it will force "Yes" and I don't want the functions to be deleted.

like image 333
Spurious Avatar asked Nov 07 '25 16:11

Spurious


1 Answers

As detailed in the documentation:

You could only target the specific functions you want to deploy, like:

$ firebase deploy --only functions:function1,functions:function2

Or you could group your Cloud Functions into export groups in your index.js/index.ts files.

Grouping functions allows you to deploy multiple functions using a single command.

See the same doc for more detail.


And yes, the --force operator bypasses the confirmation prompt, but it is the confirmation prompt for deletion, not for deployment (the --force operator is to be used with functions:delete). Therefore it will not help in your case.

like image 110
Renaud Tarnec Avatar answered Nov 09 '25 07:11

Renaud Tarnec