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

348
Views
NextJs getStaticPaths not working properly in Production Environment

I've successfully built my first Next.js App and deployed it on Vercel. It runs on an ExpressJs Backend with MongoDB for the Database. It's a site with lyrics for various songs. So here is my problem. While everything is working fine, the moment I add a new Lyric Document (A song and its lyrics) it does not load it, displaying an Error404 page. Same thing if I create a new user. It does not load his/hers profile and displays an Error404 page. In my development environment (Linked to the same API/DB) it works just fine. Can someone please help me?

More specifically. Here is the link to my deployed site: Lyrical Place

Here is the latest and only document I uploaded AFTER Production: SONG

It displays a 404 page, while it shouldn't. In my DB it exists and in my development app it works fine!


Note 1: To add any lyric document I've left a /contribute page ONLY in my development environment.

Note 2: I suspect it has to do with getStaticPaths on my /songs/artists/title dir. But it might not be that case at all.


EDIT: 1

RELEVANT CODE:

getStaticPaths on /songs/artists/title:

export const getStaticPaths = async () => {
const res = await fetch(`${process.env.PROXY}api/lyrics/getAll`);

const data = await res.json();

const paths = data.all.map((name) => ({ params: { singer: name.singer.toString(), title: name.title.toString() } }));

return {
    paths: paths,
    fallback: false
}

}

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!