index.js your index.js file in the root directory?
web: node./index.js
Your file can be attached as app/src/index.js
Web: site. /src/index.js
index.js your index.js have an uppercase index.js "I"? It should be index.js
If you have your index.js file in the root directory of your project, but a Heroku error indicates that the module cannot be found. Then your problem may be related to GIT .
How can we make sure this is so? Well, your git repository might not add the index.js file to commits and put it in heroku. You can verify this by viewing the files that git is viewing in your local repository with the following command:
git ls-files
Your index.js file should be listed. If not, then your file is ignored.
Solution : force add your file.
git add --force ./index.js
Now you can commit and push to the hero, and you must be in working condition.
This can also happen when your index file is in the dist or src directory (app / dist / index.js or app / src / index.js).
source share