butchbrody
butchbrody

Reputation: 303

Meteor requires Node v0.10.41 or later Error on heroku deployment

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.

Upvotes: 3

Views: 1715

Answers (4)

Kishor
Kishor

Reputation: 2677

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.

Upvotes: 0

Deborah
Deborah

Reputation: 4575

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".

Upvotes: 0

Elena V
Elena V

Reputation: 73

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.

Upvotes: 4

Kevin Seguin
Kevin Seguin

Reputation: 66

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

Upvotes: 5

Related Questions