Next.js Discord

Discord Forum

Module is not resolving on vercel

Answered
Oak apple gall wasp posted this in #help-forum
Open in Discord
Oak apple gall waspOP
I have very simple structure.

src/app/page.tsx


and I am importing Faq.component from

src/components/Faq


Locally everything works nicely but on vercel build is failing, why is that?
Answered by riský
ahh ill link the faq site about casing: https://nextjs-faq.com/module-not-found-due-to-case-sensitivity (i forgot about it and it has good reasoning)
View full answer

15 Replies

check the casing of file name is correct...
like check on github if the file is really capitol
Oak apple gall waspOP
Yeah its working correctly, on local build, on local development on git as well
yeah but check on the web UI because sometimes they can be weird
Oak apple gall waspOP
Yeahhhh.... you were right in webui its different
why is that?
uhh some weird casing
tbh i only learnt about it a few days ago
from other questions
but basicly windows is weird
ahh ill link the faq site about casing: https://nextjs-faq.com/module-not-found-due-to-case-sensitivity (i forgot about it and it has good reasoning)
Answer
Oak apple gall waspOP
Well same goes for Mac users as well, its some git internal staff as I found out

git config core.ignorecase false


this fixes the issue
nice
Oak apple gall waspOP
For additional information if anyone stucks with this issue run this.

git config core.ignorecase false


after this you need to clear cache of your git repo

git rm -r --cached .


after that you can update your file names and then push it on your remote repo have fun!