Have someone out there got this error when starting a node app on heroku before?
2012-10-17T20:28:52+00:00 heroku[web.1]: Starting process with command `node app.js`
2012-10-17T20:28:53+00:00 app[web.1]: bash: node: command not found
It seems like the Heroku app are missing node.
The app starts just fine locally. Both foreman start and node app.js.
{
"name": "app-name",
"description": "some desc",
"version": "0.0.1",
"private": true,
"engines": {
"node": "0.8.12",
"npm": "1.1.49"
},
"dependencies": {
"express" : "2.5.9",
"mongoose" : ">=2.6.0",
"colibri" : "*",
"jade": ">= 0.0.1"
}
}
What fixed it for me was to add the heroku/nodejs buildpack in heroku settings.
Old question, but, try adding an engines
section to your package.json
:
"engines": {
"node": ">= 6.9.4",
"npm": ">= 4.4.0"
}
First, ensure that your application is using the heroku/nodejs buildpack:
$ heroku buildpacks
If this is not the case then change your builpack to nodejs using :
$ heroku buildpacks:set heroku/nodejs
Image of terminal
Heroku recognizes an app as Node.js by the existence of a package.json. Even if your app has no dependencies, you should still create a package.json that declares a name, version, and empty dependencies in order that it appear as a Node app.
https://devcenter.heroku.com/articles/nodejs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With