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

349
Visualizações
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
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