I've been getting this ModuleNotFoundError whenever I try to deploy my website to vercel. I have renamed my components and CSS modules but for some reason, I keep getting this error.
Does anyone know how to solve this issue, because I have no idea what I'm getting wrong?
Screenshot of error log

If you has been changed the name of folder or file to lowercase or uppercase, for example: from /Components to /components
The problem shold be because you remote branch didn't update, and in local brach the name already is correct, your solution run, but the vercel use linux, that is casesensitive, so, the ModuleNotFoundError occurred.
To solve the problem, you can save your folder/file at other place, and then deleted it from project and commit it. After commit you should copy and past the file/folder saved in another place in your project again and commit to push to romete branch with correctly structure. You also can use the command "git mv "oldfileOrFolder" "newFileOrFolder", see the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With