[Support Guide] Netlify app builds locally but fails on deploy (case sensitivity)

Hi, so there are many solutions to this case sensitivity problem with how github handles it.

In my case I had changed the filename casing convention from uppercase to lowercase. I do believe that git is able to track the change but however this command
git config core.ignorecase false dictates how git operates behind the scenes

In my case I ran the command and git suddenly had lots of files to track labelled untracked.

I then hit git add. , then git commit and ran my build on netlify one more time.

Then all errros now displayed could be traced e.g
Module not found: Can't resolve './Components/ProductRightSide' in '/opt/build/repo/components/products and fixed such that git was able to track and implement the changes successfully.

Its quite a work around and a finger nail away from frustration but trust me this will surely work.

PS : after fixing your issue you may want to run the command
git config core.ignorecase true to restore how git works with case sensitivity.

Also note git config core.ignorecase false has issues with other file name extensions so you may want to watch out , do it if you know what you’re doing and sure of it.

Here’s the stack overflow thread I got my solution from

2 Likes