Node app get application error in heroku

Node app get application error in heroku
0.0 0


I’ve deployed my node app via github but i get error in the log

this is the repo link:

Thank you


Now this is the error in the log


Does your app run locally and it’s just crashing on Heroku after being deployed?

Your app.use(express.static) statement looks sort of different from how I usually write it.

You might want to try:

// Point static path to public
app.use(express.static(path.join(__dirname, 'public')));


It works fine locally
I tried your solution but I still get error


I see. Are you sure you have all your dependencies in the package.json file that’s checked into the server? It’s failing at the start of the application.


Also, I am not sure you are seeing the real error message. Try typing heroku logs -n 200 in your console and look for a more detailed message regarding why your application is failing. That usually helps me when trying to debug why applications are crashing on heroku.



After I had added a Procfile file and written in it (web: node app.js) I got this in the log