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

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