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

182
Visualizações
Next.js: getStaticProps not revalidating API call

I have this in my getStaticProps function:

getStaticProps() {
  const res = await axios({
    method: "post",
    url: url
 });

 let data = res.data;

 if (!data)
   return {
     notFound: true,
   };

 return {
   props: { data: data || null },
   revalidate: 5,
  };
}

Locally everything runs fine (when an update is made to the database it is shown on the website), but in production (the website is on vercel) the data isn't getting revalidated even after the revalidation period is passed, so I basically have the same data even if it is changed in the database

Any ideas what the problem could be?

about 4 years ago · Juan Pablo Isaza
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