Logs eventsource failed - node.js

I create a nodejs app.
heroku local web works perfect.
However when I pushed it to heroku and open the application, error message pops up
ui error message
When I tried heroku logs --tail, another error shows up on the console
console error.
Please help me fix this, thank you!

I am the author of this post and I figured out where the problem is by executing
heroku run bash and manually restarting the program and soon observed the error in the output.
It was because I omitted installing one dependency, which caused the nodejs program fail to start.
However, the output of heroku logs --tail still needs improving. It does not return anything useful other than a 400 error.

Related

Node.js app showing favicon.ico path error

I have deployed a Node.js app to heroku but as I run it for first time, it works good but then some error logs come up which say npm error and favicon.ico error and then the server closes the connection. I am not getting any sort of help from their documentation. Please help me run it!!

How to check errors log on heroku? (nodejs app)

Where can I check what error my nodejs app is producing?
I dont have that error on my local machine, and heroku web worker only returns to browser:
"Internal Server Error"
How can I find out what is this error about?
You can run heroku logs command or use add-ons like Papertrail to manage your logs.
If you error has an error code you can find more info about it in Heroku Error Codes

Getting error in package.json while uploading to Openshift server

I am getting following error when i am trying to push my application to Openshift server. I have updated only package.json and trying to upload it on server then it showing this error.
So i have written couple of command to find out this error. So i found the following error but i am not getting what should i do now to fix this error.
My package.json is following below. If you think that there is some error in this package.json, please inform me. It is running fine on localhost but i do not know it is not able to find out package.json.
it's possible that the existing running application is not getting stopped correctly. Try using the rhc app stop command to completely stop your application, and then ssh to your gear (rhc ssh) and use the "ps -ef" command to make sure nothing else is running that would be taking up that port.

Heroku - Node.js application deployed successfully, heroku local fails

I have a MEAN stack app which has been successfully deployed to heroku. Everything works great using the heroku hosted version of my application.
For some reason, when I run my app using "heroku local" it fires up and appears to be working correctly but I can't access any of my endpoints.
Postman gives me the following error instantly "Could not get any response". I am also at a loss for where to even begin troubleshooting this problem, even running the application using "node app.js" gives me the same error. This did not happen prior to deploying to heroku!
Some files I have added are 'Procfile'
web: node app.js
Am I missing something here?
Another thing I have added is the MongoLab addon, to isolate and see if this was the issue I created a test endpoint at "http://localhost:8080/api/test" but it doesnt even respond with the simple "message: 'Success!'" json response.

How to get logs for Application Error on Heroku

I have been trying to redeploy my app hosted on Heroku.
On every redeploy i was getting "Your app was successfully deployed."
But on opening the page i was getting:
An error occurred in the application and your page could not be served.
Please try again in a few moments.
If you are the application owner, check your logs for details.
On opening the logs under the 'Activity' tag gave me logs but it had nothing about what went wrong.
How would one get to know whats causing application error.
We could get the logs for Heroku easily from heroku shell. To get 'heroku shell' on you computer, install heroku toolbelt.
One installed, from 'cmd' login to heroku:
heroku login
Then you could get the logs:
heroku logs --app APPNAME
This works irrespective of whether you use git, github or dropbox.

Resources