Next.js Discord

Discord Forum

Build: module not found

Answered
Xander posted this in #help-forum
Open in Discord
  ▲ Next.js 14.2.3
   Creating an optimized production build ...
Failed to compile.
./src/app/about/page.mdx
Module not found: Can't resolve '@/app/ui/CurrentTime'

When building through vercel, it complains about not being able to find components that are clearly there. pnpm run build works fine locally, and the file mentioned does exist on git.
Answered by riský
View full answer

27 Replies

as i said, this works locally
Answer
oh that's weird, good spot though
why would it work on local though?
as the link i sent says, windows is case insensitive but vercel (linux) isnt
oh yeah so it is
@riský it's still doing it
correct this time
i havent done this for ages, but try deleting it from git
then re adding
actually on google i see people recomending using git mv :old_filename :new_filename and then git commit -a -m ":commit_message"
yeah i actually did that as a debugging step not knowing what it was doing
yeah it's recommitting
yayyyy
oh god more red
morning job
it's complaining about apostrophes
like <p>It's me</p>
hahah those are fun
use &apos;
but why the need?
it will look terrible
react fun
or {"It's me"}
anyway its an eslint error and if it works on dev, then it could be safeish to disable but i wouldnt be so sure
alright thank you