Skip to content

Heroku: Module not found #2503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Jun 8, 2017 · 4 comments
Closed

Heroku: Module not found #2503

ghost opened this issue Jun 8, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 8, 2017

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

@gaearon
Copy link
Contributor

gaearon commented Jun 8, 2017

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

@ghost
Copy link
Author

ghost commented Jun 8, 2017

Thank you so muck !

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

Thank you 👍

@gaearon gaearon closed this as completed Jun 8, 2017
@gaearon
Copy link
Contributor

gaearon commented Jun 8, 2017

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.

@bluengreen
Copy link

This just got me last night. Ugh.

@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants