6

there seems to be a strange problem with the deployment of my app on heroku on cedar stack where my node process doesn't even get called

my Procfile is as follows:

web: node web.js

and my package.json file:

{
 "name": "fuuzik",
 "version": "0.0.1",
 "dependencies": {
   "express": "3.x",
   "jade":"*",
   "mime-magic":"*"
  },
 "engines": {
  "node": "0.8.x",
  "npm": "1.1.x"
  }
}

So after i commit and push heroku detects it's a node app fine and builds my dependancies correctly and even says that it deployed .. yet the app is crashed immediately on deploy and heroku logs returns:

2012-08-29T08:52:14+00:00 heroku[api]: Deploy d9fdb17 by [email protected]
2012-08-29T08:52:14+00:00 heroku[web.1]: State changed from crashed to starting 
2012-08-29T08:52:14+00:00 heroku[slugc]: Slug compilation finished
2012-08-29T08:52:16+00:00 heroku[web.1]: Starting process with command `node web.js`
2012-08-29T08:52:16+00:00 app[web.1]: bash: node: command not found
2012-08-29T08:52:17+00:00 heroku[web.1]: Process exited with status 127 
2012-08-29T08:52:17+00:00 heroku[web.1]: State changed from starting to crashed

foreman runs fine and there are a couple of .php files around the root directory (since I am porting some old code) but I am pretty sure that should be allowed by the logic of Procfiles

As requested here's the output of npm install locally:

--[/DEBUG]--
[email protected] node_modules/jade
├── [email protected]
└── [email protected]

[email protected] node_modules/express
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

[email protected] node_modules/mime-magic

and here's the git log when i push (it's a bit big so i linked it):

http://pastebin.com/d424TBfR

Any help appreciated!

6
  • Does it make a difference if you specify a complete version for node / npm (without the .x)?
    – Golo Roden
    Aug 29, 2012 at 9:13
  • just tried with node 0.8.7 and npm 1.1.4 .. i also tried removing my local node_modules folder (although that shouldn't be related or anything) no luck .. :( Aug 29, 2012 at 9:19
  • What happens when you run npm install locally? Also, provide the earlier output of when you push it to Heroku. Aug 29, 2012 at 13:16
  • I edited the question to include that Aug 29, 2012 at 15:17
  • Well, your pastebin clearly shows a bunch of errors. I'm surprised you're surprised to find it's not working :-) In particular, you're using a library mime-magic that appears to be a wrapper around some native code that isn't available on Heroku. Aug 29, 2012 at 16:16

3 Answers 3

4

Try deleting your Procfile.

Apparently, the Procfile indicates heroku to run the app using node main.js but node is not a valid command since it is not included in the PATH varialbe, or similar.

By deleting the Procfile, heroku detects that the app is a meteor app and runs it using node's binary with the full path.

Also, remember the ROOT_URL must be set beginning with http://

3

These commands solved the issue

heroku buildpacks:set heroku/nodejs
git commit -am "empty" --allow-empty
git push heroku master
0
0

Libmagic (required by mime-magic) is expecting a different version of libc then heroku provides. You will need to find an alternative library or compile it your self for heroku's version of libc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.