Error: [functionName(us-central1)] Changing from a callable function to an HTTPS function is not allowed. Please delete your function and create a new one instead.
Any advice and insight is appreciated.
Which version of Firebase CLI (firebase --version) are you using? Last night I updated firebase-tools package to 10.3.0 and functions deployment started giving me the error you mention. I downgraded to 10.2.2 and functions deployment started working as before.
Update: Firebase team confirmed there is an issue with 10.3.0 firebase-tools. They are working on a fix: https://github.com/firebase/firebase-tools/issues/4307
Solution 01:
I think the main problem lies inside whether you are using a valid way to use .env file. Since I just recently have this kind of error. If you do use the .env file inside the structure of your folder, then
process.env.VARIABLE_NAME. Example way is like this:
require("dotenv").config({path: "../.env"});firebase deploy --only functionsI added a path to the .env file, since I checked Firebase Cloud Function Logs and it gave me error for all Cloud Functions which uses process.env.VARIABLE_NAME. This .env file must be located inside the root project and placed inside folder functions/. Give it a try. Hope it works.
Solution no. 2:
You should check if there is a variable or function which doesn't give return value, like example below:
const key = async () => {
const response = await pk.accessSecret("PRIVATEKEY");
return response;
};
Changing from a callable function to an HTTPS function is not allowed. Please delete your function and create a new one instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With