Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

137
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda