Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor Heroku App Crash after deployment

After deploying the app to heroku, my app fails to start. I think this might be to do with the build pack and latest version of meteor 0.9.x?

Where should I start to debug this from?

2014-09-02T05:02:58.848513+00:00 heroku[web.1]: State changed from crashed to starting
2014-09-02T05:03:05.407436+00:00 heroku[web.1]: Starting process with command `.meteor/heroku_build/bin/node .meteor/heroku_build/app/main.js`
2014-09-02T05:03:06.578829+00:00 app[web.1]: module.js:340
2014-09-02T05:03:06.579092+00:00 app[web.1]:     throw err;
2014-09-02T05:03:06.586422+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2014-09-02T05:03:06.578419+00:00 app[web.1]: 
2014-09-02T05:03:06.586423+00:00 app[web.1]:     at Module.require (module.js:364:17)
2014-09-02T05:03:06.579105+00:00 app[web.1]:           ^
2014-09-02T05:03:06.586414+00:00 app[web.1]: Error: Cannot find module 'fibers'
2014-09-02T05:03:06.586426+00:00 app[web.1]:     at require (module.js:380:17)
2014-09-02T05:03:06.586420+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2014-09-02T05:03:06.586428+00:00 app[web.1]:     at Object.<anonymous> (/app/.meteor/heroku_build/app/programs/server/boot.js:1:75)
2014-09-02T05:03:06.586429+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2014-09-02T05:03:06.586431+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:474:10)
2014-09-02T05:03:06.586432+00:00 app[web.1]:     at Module.load (module.js:356:32)
2014-09-02T05:03:06.586434+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2014-09-02T05:03:06.586436+00:00 app[web.1]:     at Module.require (module.js:364:17)
2014-09-02T05:03:07.681468+00:00 heroku[web.1]: State changed from starting to crashed
2014-09-02T05:03:07.680466+00:00 heroku[web.1]: Process exited with status 8
like image 779
Kelvin U Avatar asked Sep 02 '14 11:09

Kelvin U


2 Answers

I don't have enough points to leave a comment to your post, but this will solve your problem even if it doesn't answer your question. This question hasn't been answered in over a month so why not?

You are correct. Many popular buildpacks are having trouble with meteor 0.9.x; I'm not a good enough programmer to understand why or what the spefic issues are. I'm also not sure why the buildpack linked below works, but it does.

https://github.com/djhi/heroku-buildpack-meteorite.git

Hopefully this will help other meteor developers suffering from the same issues even if this post doesn't answer the question.

EDIT - updated post per @jww's comment; my post still doesn't provide an answer but it does provide a solution.

EDIT 2 - This buildpack is not longer working for me. See my comment below. The following is working again for me: https://github.com/AdmitHub/meteor-buildpack-horse

like image 134
Adam Avatar answered Oct 08 '22 16:10

Adam


I had this issue. This because of the node version, Meteor support node 0.10.36 or higher version

I just followed my steps it work's well

Create meteor application and make sure it's running without any error.

meteor create todo

Go to todo app directory

cd todo

Add and commit with GIT

git init
git add .
git commit -am "Initial commit"

Create heroku app with buildpack

heroku create --buildpack  https://github.com/kannans/heroku-buildpack-meteor.git

Add meteor heroku configurations

heroku addons:add mongolab:sandbox
heroku config:add MONGO_URL=<mangolap url> 
heroku config:add ROOT_URL=https://herokuappname.herokuapp.com/

For MONGO_URL. Just create account & get url from https://mongolab.com/

Push your changes to Heroku.

git push heroku master

My meteor app in Heroku :) https://herokuappname.herokuapp.com/

like image 27
Kannan S Avatar answered Oct 08 '22 16:10

Kannan S