Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
Switch Firebase Function to Gen-2

i just saw that we have Cloud Functions 2nd generation which looks great: https://cloud.google.com/functions/docs/2nd-gen/overview

But how can i switch my 1nd gen function to be 2nd gen? I see that i can create a new function as 2nd gen like this:

const functions = require('@google-cloud/functions-framework');

functions.http('helloHttp', (req, res) => {
 res.send(`Hello ${req.query.name || req.body.name || 'World'}!`);
});

but what about old functions? Is there a way or i will have to delete and re-create them one-by-one?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Cloud Function Gen2 is only available for the product Cloud Functions, not Firebase functions.
Firebase functions use the library firebase-functions while Cloud Functions uses @google-cloud/functions-framework.
From the Google Cloud console both functions will appear the same but if you try to deploy a Cloud Function gen2 over a Cloud Function gen1, you will receive the following error:

Failed to create function, function projects/[PROJECT_NUMBER]/locations/[LOCATION]/functions/[FUNCTION_NAME] already exists under 'Gen 1' environment. Please delete conflicting function first or deploy the function with a different name.

You will need to migrate completely from Firebase functions to brand-new created Cloud Functions gen2.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!