Vercel module not found
Answered
Himalayan Snowcock posted this in #help-forum
Himalayan SnowcockOP
In a nextjs, tailwind css, typescript project, I changed the file names of some of my components, and since then I've had several "Module not found : Can't resolve ..." errors on Vercel when I try to deploy my application.
I've used ChatGPT to try and solve my problem, but it didn't work, I've checked my component imports, I've used the git config core.ignorecase false command, etc., but I still get the following errors on Vercel (see attachment)
I've used ChatGPT to try and solve my problem, but it didn't work, I've checked my component imports, I've used the git config core.ignorecase false command, etc., but I still get the following errors on Vercel (see attachment)
28 Replies
@Himalayan Snowcock is a local build working?
@Arinji <@573514794221699093> is a local build working?
Himalayan SnowcockOP
yes
@Himalayan Snowcock yes
try deleting your vercel project
maybe it fucked up with its files downloading
Himalayan SnowcockOP
only during deployment
i have had a few issues like that
@Himalayan Snowcock only during deployment
yea where else would it break lol..
Himalayan SnowcockOP
Oke I'll try that
@Arinji try deleting your vercel project
Himalayan SnowcockOP
No, it doesn't work, the same errors always occur.
Himalayan SnowcockOP
It's a case problem because I forgot to capitalize my components, that's where the errors come from.
yea looks like its here as well xD
i shld have shown that first
Himalayan SnowcockOP
I've already seen his links but it didn't lead to anything, I've checked my imports and filenames, there's nothing that's changed.
I'm sorry but this is not the solution to my problem, there are always errors on Vercel even when all the necessary checks are applied.
now: can you go to github and see if the file name capitalisation displayed on github is exactly the same as your import statements?
Himalayan SnowcockOP
I'll take a look
don't trust your macOS file names because macOS (and Windows) are case insensitive
Himalayan SnowcockOP
ok ok
Nice one!
But how do I change the file names since they're not identical locally? Do I have to colonize the repo again?
But how do I change the file names since they're not identical locally? Do I have to colonize the repo again?
Answer
this is why i now always use this-case for my files. for example, dropdown-table.tsx. prevent the capitalisation headache
Himalayan SnowcockOP
I will be for the next few times!
thx