Everything works fine when I run the site locally using yarn dev.
And the Homepage looks like this -
The directory structure looks something like this -
Notice that the components folder is inside pages folder.
But when I try to build this using yarn build, I get following error:
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:
The UI after moving components outside pages folder.
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