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

522
Visualizações
Export Errors while building next.js project (non-react exports error and prerendering error)

Everything works fine when I run the site locally using yarn dev.

And the Homepage looks like this -

enter image description here

The directory structure looks something like this -

enter image description here

Notice that the components folder is inside pages folder.

But when I try to build this using yarn build, I get following error:

enter image description here image continued below: enter image description here

So I tried putting the whole components folder outside the pages folder, which makes the build run successfully but the UI goes nuts:

The updated project dir:

enter image description here

The UI after moving components outside pages folder.

enter image description here

Why does this happen, when all the imports are updated accordingly. Is there a way around it, or re-writing the whole codebase is my only option.

NOTE: I tried moving only the files/dirs mentioned in the build error (like nftPreview, contentCard etc) but same thing happens. So I thought it'll be better to put the whole component folder outside pages folder for future's sake.

Here's the github link of the project - https://github.com/xylanreeves/bitverse

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