Build: module not found
Answered
Xander posted this in #help-forum
XanderOP
▲ 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ý
if you look on github, the
i is capitol: https://nextjs-faq.com/module-not-found-due-to-case-sensitivity27 Replies
as i said, this works locally
if you look on github, the
i is capitol: https://nextjs-faq.com/module-not-found-due-to-case-sensitivityAnswer
XanderOP
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
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"XanderOP
yeah i actually did that as a debugging step not knowing what it was doing
yeah it's recommitting
hahah those are fun
use
'XanderOP
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
XanderOP
alright thank you