Heroku errors with Meteor 1.4.1.1

2019-09-18 01:58发布

问题:

I was following this guide in order to deploy my app. There are no errors with my push, however when I open the app on my heroku dashboard I am met with an application error page.

This is what the logs show:

2016-09-28T16:05:56.493404+00:00 heroku[web.1]: Starting process with command `npm start`
2016-09-28T16:05:58.915131+00:00 app[web.1]: 
2016-09-28T16:05:58.915154+00:00 app[web.1]: > TTR@ start /app
2016-09-28T16:05:58.915155+00:00 app[web.1]: > meteor run
2016-09-28T16:05:58.915155+00:00 app[web.1]: 
2016-09-28T16:05:58.920402+00:00 app[web.1]: sh: 1: meteor: not found
2016-09-28T16:05:58.928190+00:00 app[web.1]: 
2016-09-28T16:05:58.938161+00:00 app[web.1]: npm ERR! Linux 3.13.0-93-generic
2016-09-28T16:05:58.938683+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-09-28T16:05:58.939001+00:00 app[web.1]: npm ERR! node v5.11.1
2016-09-28T16:05:58.939801+00:00 app[web.1]: npm ERR! npm  v3.8.6
2016-09-28T16:05:58.940297+00:00 app[web.1]: npm ERR! file sh
2016-09-28T16:05:58.940554+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-09-28T16:05:58.940702+00:00 app[web.1]: npm ERR! errno ENOENT
2016-09-28T16:05:58.940855+00:00 app[web.1]: npm ERR! syscall spawn
2016-09-28T16:05:58.941055+00:00 app[web.1]: npm ERR! TTR@ start: `meteor run`
2016-09-28T16:05:58.941269+00:00 app[web.1]: npm ERR! spawn ENOENT
2016-09-28T16:05:58.941504+00:00 app[web.1]: npm ERR! 
2016-09-28T16:05:58.941722+00:00 app[web.1]: npm ERR! Failed at the TTR@ start script 'meteor run'.
2016-09-28T16:05:58.941941+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2016-09-28T16:05:58.942090+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the TTR package,
2016-09-28T16:05:58.942204+00:00 app[web.1]: npm ERR! not with npm itself.
2016-09-28T16:05:58.942309+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2016-09-28T16:05:58.942414+00:00 app[web.1]: npm ERR!     meteor run
2016-09-28T16:05:58.942519+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2016-09-28T16:05:58.942625+00:00 app[web.1]: npm ERR!     npm bugs TTR
2016-09-28T16:05:58.942728+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2016-09-28T16:05:58.942985+00:00 app[web.1]: npm ERR!     npm owner ls TTR
2016-09-28T16:05:58.943094+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-09-28T16:05:58.946745+00:00 app[web.1]: 
2016-09-28T16:05:58.947021+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-09-28T16:05:58.947129+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2016-09-28T16:05:59.015852+00:00 heroku[web.1]: State changed from starting to crashed
2016-09-28T16:05:59.001860+00:00 heroku[web.1]: Process exited with status 1

I have tried both the https://github.com/AdmitHub/meteor-buildpack-horse.git and https://github.com/jordansissel/heroku-buildpack-meteor.git buildpacks. Any ideas what I could try to get this running?

回答1:

Hope I will helps.

That is the guide I used to do it, and every things was Ok for me:

https://medium.com/@leonardykris/how-to-run-a-meteor-js-application-on-heroku-in-10-steps-7aceb12de234

With this buildpack(https://github.com/dassiorleando/heroku-buildpack-meteor), I forked from (https://github.com/jordansissel/heroku-buildpack-meteor) and edit the node engine version to allow me to deploy my app made with the new version of meteor(1.4.X.X).

If it was helpful, just mark it as the best answer, if not give us for example a github repository with a simple version of the app you want to deploy on heroku, then we will try to do it and better figure out what is wrong.



回答2:

To get meteor to deploy on Heroku I had to use https://github.com/AdmitHub/meteor-buildpack-horse.git#beta for my buildpack and update meteor to 1.4.2.3



回答3:

I had this issue and I had to edit the "name" package.json to match the name of the app on heroku. This is why it is recommended that you use the same name of the app when you run "meteor create" when you create the app via Heroku (either command line or in the Heroku Console)