• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

255
Vistas
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

almost 3 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda