3

I recently tried deploying my first MeteorJS (1.3) application on heroku and am getting a server log error - "Meteor requires Node v0.10.41 or later". Not sure what the relationship is between node and meteor. Do meteor apps actually need a node backend or is this a meteor bug?

Also, when I run "meteor node -v" I get v0.10.43 which IS a later version so I'm not sure what the problem is when deploying.

butchbrody
  • 303
  • 2
  • 9

4 Answers4

5

It's a problem with buildpack "jordansissel/heroku-buildpack-meteor.git"

Meteor 1.3 requires Node 0.10.41, and this buildpack compiles node at 0.10.40.

I submitted a pull request for a new buildpack, or try my fork at https://github.com/kevinseguin/heroku-buildpack-meteor.git

  • 1
    Thank you Kevin. I used your fork as my buildpack and saw where you updated your version of node in the "compile_node" file. Error is gone from heroku logs. App is still crashing...but for different reasons. – butchbrody Apr 02 '16 at 17:22
  • I also set the buildpack to your fork. But I'm still getting app crash with "Meteor requires Node v0.10.41 or later." I tried heroku restart and also "git push -f heroku master" (from the answer below). Suggestions, anyone? – Deborah Jun 14 '16 at 11:47
  • The kevinseguin buildpack didn't work for me; the `https://github.com/AdmitHub/meteor-buildpack-horse` one did. – Dean Radcliffe Jul 12 '16 at 20:51
4

I've faced the same problem with deploying new version of meteor 1.3 and also spent the best part of the day, but eventually got easy solution!

You take last buildpack for meteor 1.3: https://github.com/michaltakac/meteor-buildpack-horse and then doing everything as shown there, but instead doing git push heroku master, you do

git push -f heroku master

So the whole bunch for your commands:

>heroku create <yourapp>
>heroku buildpacks:set https://github.com/michaltakac/meteor-buildpack-horse.git
>heroku addons:create mongolab
>heroku config:set ROOT_URL=https://<yourapp>.herokuapp.com
>git push -f heroku master

Thanks to gitjason for his advice to get the right direction.

Community
  • 1
  • 1
Elena V
  • 73
  • 8
  • The `https://github.com/AdmitHub/meteor-buildpack-horse` one worked for me. If I were you I'd take the `-f` out of your answer - it could not have helped, and someone could really hurt themselves by using it and lose commit history! – Dean Radcliffe Jul 12 '16 at 20:52
0

Did you search on the web or in the Meteor documentation, before posting? From the documentation, it says,

Your JavaScript code can run in two environments: the client (browser), and the server (a Node.js container on a server).

Basically, Meteor runs on top of node JS with all the boiler plate for reactivity and other features.

EDIT: Now meteor also has a guide.

Kishor
  • 2,659
  • 4
  • 16
  • 34
  • 1
    Yes I've spent the better part of the day trying to deploy, researching this and other errors before posting. – butchbrody Apr 01 '16 at 04:42
  • @DeanRadcliffe: Thanks for providing the link for OP but I assume you are new to Meteor since guide.meteor.com is not available when I wrote this answer and documentation use to be different. My second link for documentation actually points out to the relevant section but it is no longer available. – Kishor Jul 12 '16 at 23:35
  • 1
    Cool, @Kishor. Here's that link again: http://guide.meteor.com/deployment.html#environment – Dean Radcliffe Jul 14 '16 at 02:38
0

In case anyone else comes here, after trying the fixes here my app still had errors launching on Heroku, but the error messages were not verbose and only continued to give the Node version error. This series of fixes got it going.

1. in terminal, npm install - for me this re-installed npm. I also ran "meteor update" but I knew there was no significant update that would break my app.

2. check the .gitignore file - something important might be in there. In my case, "newrelic" folder was in there but not referenced as a dependency in package.json. To fix this make sure all subfolders have a dependency reference in package.json (recommended) or else remove node_modules from .gitignore (creates extra fetching, not recommended but works).

3. use Kevin's build path above - or another updated Meteor build package - I used the horse package. Make sure you add .git to the end of the URL like so:

heroku buildpacks:set https://github.com/kevinseguin/heroku-buildpack-meteor.git --app myAppName

4. set the $PATH - in terminal: PATH=$PATH:$HOME/.meteor

5. set the ROOT_URL in Heroku - some instructions out there say to set it as "myAppName.herokuapp.com". This causes an error in Heroku. It is fixed if you prepend, "http://", like so, "http://myAppName.herokuapp.com".

Deborah
  • 4,316
  • 8
  • 31
  • 45