karim_mo
karim_mo

Reputation: 147

React app deployment to Netlify : Module not found: Error: Can't resolve './pages/HomePage' in '/opt/build/repo/src'

Deplyment Error

How can I solve this error?

I tried many approaches like using Netlify CLI, linking to git and github but nothing worked.

The app works fine in development mode with no errors but it shows Error:404 page not found on both Netlify and Github Pages

The link of the deployed app

What should I do?

Upvotes: 1

Views: 1328

Answers (2)

Arun-G
Arun-G

Reputation: 101

Check your directory names using gitbash terminal, as it works like a linux Netlify/Vercel are linux containers check the actual case using gitbash and fix the name as per the import enter image description here

Upvotes: 0

karim_mo
karim_mo

Reputation: 147

I found the solution, I changed the folders' names and pushed them into Github but Github didn't change the folders' names, and Netlify is case-sensitive towards nomenclature.

Upvotes: 6

Related Questions