Can't deploy due to unresolved image imports?
jasonyapp
FREEOP

7 months ago

New to coding and first time trying to deploy and host a project.

In my project I import an image in as .png but I notice in the build logs it states here:

 '/app/app/images/KanBanView.PNG',
    '/app/app/images/BarConversionRate View.PNG',
    '/app/app/images/UpcomingTasks.PNG',
    '/app/app/images/BarStatsView.PNG',

Does this mismatch actually affect the build? I have also attached a screenshot proving that is it not all caps, and they are in fact lowercase. If I try to match it somehow by using .PNG in my imports, it does not let me. This all works on localhost, but get issues trying to deploy on Railway.

Solved

16 Replies

jasonyapp
FREEOP

7 months ago

6d7cdf34-21cc-4605-bb0e-809220f4446c


dev
MODERATOR

7 months ago

do the caps appear on your GitHub repo? I had issues like this before where my github repo and my local repo had mismatched casings which caused the biggest headache the world has ever seen


jasonyapp
FREEOP

7 months ago

Huh. I have 5 images. In github, 4 appear as .PNG and only one appears as .png


jasonyapp
FREEOP

7 months ago

I have closed and re-opened vscode, gone into my actual project folder in file explorer as well and both verify that it says .png


jasonyapp
FREEOP

7 months ago

git status says there's nothing to commit, so how do I make it update to .png?


dev
MODERATOR

7 months ago

its cause github by default ignores casings as far as I know
so if you have JohnDoe.Txt on github but locally you have johndoe.txt github will assume its the same file (asn, wont delete the old one and wont create a new one like it normally would in this case)

you can disable it via: git config core.ignorecase false
or delete the files on github and reupload them with the correct casing


jasonyapp
FREEOP

7 months ago

Oh. Thanks! Do you know how I can delete them on git? Sorry I'm new to all of this


dev
MODERATOR

7 months ago

no worries, and yea just go to your repo on github, then find the file you want to delete (click on it) then click on the hamburger menu and click Delete file


jasonyapp
FREEOP

7 months ago

When I delete it, if I go back out it reappears and I can still access it


dev
MODERATOR

7 months ago

did you refresh the tab?


jasonyapp
FREEOP

7 months ago

yea


jasonyapp
FREEOP

7 months ago

Technology does seem to fail whenever I touch it


dev
MODERATOR

7 months ago

i think the easiest solution here would be to just enable case sensitivity


jasonyapp
FREEOP

7 months ago

Yep it worked! Thankyou! I never would have thought to check git


dev
MODERATOR

7 months ago

No problem, happy to help


dev
MODERATOR

7 months ago

!s


Status changed to Solved dev 7 months ago


Loading...