Heroku Nodejs app with R10, H10 and H20 errors
I get this error when i write wrong command in the package.json : i wrote :
"scripts" : {
"start": "index.js"
}
instead of :
"scripts" : {
"start": "node index.js"
}
when i wrote node index.js I'm all set.
Maybe your wrong listen port?
Check your app port,look up if there is set to process.env.PORT || 3000
.
One of your log says:
2013-09-08T01:15:34.427477+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
To solve this, use the following for port number:
var port_number = server.listen(process.env.PORT || 3000);
app.listen(port_number);
Heroku sets a dynamically assigned port number to your app. Hence if you are strictly specifying a port number to be used, Heroku won't be able to do that.
However, you should set a port number so that your app can execute on localhost
. Hence, the pipe
to a specified port number '3000'.
Found this answer from Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)