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

178
Views
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
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!