Create-react-app: Heroku: Module not found

Created on 8 Jun 2017  路  4Comments  路  Source: facebook/create-react-app

When I push my code to heroku he don't find my files:

Module not found: Error: Can't resolve './components/navigation/Navbar' in '/tmp/build_57c0b040126c80ff854d5d76e8a659a1/src'

This is my scripts in package.json
"scripts": {
"dev": "concurrently \"nodemon -x 'npm start'\" \"npm run dev-server\"",
"start": "babel-node server.js",
"dev-server": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"heroku-postbuild": "npm run build"
}

node v6.11.0
npm v3.10.10

Most helpful comment

Maybe it's called navbar.js in your Git repo, and this is a case sensitivity issue.
Try changing your import.

All 4 comments

Maybe it's called navbar.js in your Git repo, and this is a case sensitivity issue.
Try changing your import.

Thank you so muck !

I don't know why git doesn't check if I change the name of a file !

Thank you 馃憤

To change file casing in git, you need to rename a file to something completely different, commit, and then rename it to the new name you wanted. It won't detect renames that only affect the file case.

This just got me last night. Ugh.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexeyRyashencev picture AlexeyRyashencev  路  3Comments

adrice727 picture adrice727  路  3Comments

oltsa picture oltsa  路  3Comments

stopachka picture stopachka  路  3Comments

rdamian3 picture rdamian3  路  3Comments