Module is not resolving on vercel
Answered
Oak apple gall wasp posted this in #help-forum
Oak apple gall waspOP
I have very simple structure.
and I am importing Faq.component from
Locally everything works nicely but on vercel build is failing, why is that?
src/app/page.tsxand I am importing Faq.component from
src/components/FaqLocally 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)
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
this fixes the issue
git config core.ignorecase falsethis fixes the issue
nice
Oak apple gall waspOP
For additional information if anyone stucks with this issue run this.
after this you need to clear cache of your git repo
after that you can update your file names and then push it on your remote repo have fun!
git config core.ignorecase falseafter 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!