First Heroku deploy failed `error code=H10`

Found solution for me here: Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)

In my case my app crashed because I was hard setting the PORT, instead of using the port that heroku dinamicaly sets, which can be accessed with process.env.PORT

app.listen(process.env.PORT || 3000, function(){
  console.log("Express server listening on port %d in %s mode", this.address().port, app.settings.env);
});

I just had a similar issue with my app, I got the issue after a migration of the DB, after trying many options, the one that helped me was this:

heroku restart

(Using Heroku toolbelt for mac)


I had this issue, the only problem was my Procfile was like this

web : node index.js

and I changed to

web:node index.js

the only problem was spaces


In my case, i found same error because there is version difference of node and npm on my local machine and defined in package.json version.

"engines": {
  "node": "0.8",
  "npm": "1.2.x"
}

when i check using

node --version : v0.10.41
npm --version : 1.4.29

when i update my package.json to

 "engines": {
  "node": "0.10.41",
  "npm": "1.4.29"
}

It works fine :)