module not found after changing file capitalization
Unanswered
Somali posted this in #help-forum
SomaliOP
locally it works fine, but as soon as i deploy to vercel, it throws me an error:
i renamed the file name from card.tsx to Card.tsx. in local dev it works fine, no errors, vercel seems not to pick up on it
Module not found: Can't resolve '../components/Card'i renamed the file name from card.tsx to Card.tsx. in local dev it works fine, no errors, vercel seems not to pick up on it
50 Replies
yeah does sound like caps being the issue, https://nextjs-faq.com/module-not-found-due-to-case-sensitivity, what is shown on github (ie which case, and you should delete and re-add to simplify fixing)
Windows vs Linux.
Verve’s is going to deploy to Linux. Iirc there is an option in the next config to force insensitivity.
SomaliOP
is there another way to fix that? i'd rather not disable caps sensitivity just in case
@Jboncz Verve’s is going to deploy to Linux. Iirc there is an option in the next config to force insensitivity.
i think you should solve root issue instead of monkey patching
@Somali is there another way to fix that? i'd rather not disable caps sensitivity just in case
delete the file -> commit -> re add it -> commit -> profit?
and then use kebab and dont deal with caps :)
SomaliOP
😭
never heard of kebab is it hard to set it up
@riský i think you should solve root issue instead of monkey patching
Agreed. Yeah what risky said. It can be a little annoying when urls are case sensitive when deployed.
lol it’s a philosophy not a library
@Somali never heard of kebab is it hard to set it up
its just hello-world.tsx opposed to HelloWork.tsx, and yeah what jboncz said
SomaliOP
ah lol
capitalization looks better since components are written like that too
well yeah
SomaliOP
but since this kinda sucks i might switch to kebab in my next project
it does kinda
Sorry that was a stupid response lol
I had to delete it.
i eventually got used to it, but considering windows and git... ahhh
and then kabab sometimes isnt valid and then i get sad https://canary.discord.com/channels/752553802359505017/752647196419031042/1254345802571317258
Yeah there’s always a downside lol
@riský *and then kabab sometimes isnt valid and then i get sad https://canary.discord.com/channels/752553802359505017/752647196419031042/1254345802571317258*
SomaliOP
huh? in what context does that happen
that's so weird
parallel route names
SomaliOP
in english
@Jboncz Yeah there’s always a downside lol
solutionistojustnothaveanyjoiners
I just camel case it all.
@riský parallel route names
SomaliOP
is this a react router thing? wtf is parallel route name
nextjs thing
@riský delete the file -> commit -> re add it -> commit -> profit?
SomaliOP
this worked btw
thank u
It’s a be the feature.
@Somali thank u
yooo np
@Somali is this a react router thing? wtf is parallel route name
so i would answer your question, if i even knew what it did honesly
@Jboncz Damn risk takes another w from me.
hahaha what can i say, i be the risk
Yeah I don’t use parallel routes but there is a nextjs page with documentation if your curious.
@riský yooo np
and this seemed to be the easiest fix for when i encounted this with others, git history is funny and i dont like random git commands
SomaliOP
idk parallel sounds scary
i'm good
same
SomaliOP
there's 99999 ways to do the same thing it'd take 10 lifetimes to try it all
considering joulev had that philosophy of kebab for ages, and only not found minor issue, id say its fine
Case sensitive urls shouldn’t be a thing imo. lol
But anyways glad the issue is fixed
@Somali idk parallel sounds scary
i mean i have used it once to show modal if from the page to show preview and otherwise show normal page (like instagram), but even that scared me