Gui' Blog

Git Vs. Vercel

Git Vs. Vercel

Deploy

As you now know this website is deployed on vercel, and for some reason, I F**k'd up a single import:
1import Hero from '/components/HomePage/Hero';
2
This was working perfectly fine on Local, but not on deploy, because the right import must have been:
1import Hero from '/components/homePage/Hero';
2
Based on Linux, vercel is case sensitive, but first I ignored my mistake because the first code was perfectly working locaaly, then, when I realize my mistake, change the case, that was still not working:
1Module not found: Can't resolve "/components/homePage/Hero" in "/vercel/path0/blog/pages"
2
After Hours of reaserch and internet digging, i finnaly foud the glitch .. git push cache too, as far as I understood.
you "just" need to put it away, like that :
1git rm -r --cached .
2git add --all .
3git commit -am "Fix casing discrepancies."
4git push origin branch_name
5
This page saved me hours of digging, and prevent my brain to blow up.