2

I am trying to add a Meteor.Js project to an OpenShift Gear by following this tut: https://www.openshift.com/blogs/cloudy-with-a-chance-of-meteorjs

I had to use mongoDB-2.4 other than that I followed the rest of the tut.

upon pushing my project to the Gear and getting a success status from the rhc cli, I went to the URL and got a 503. Then I restarted the app, with the same results. Then I used the command:

rhc tail <appName>  #<appName> is the actual name of my app

And got the error code:

Meteor requires Node v0.10.26 or later.
DEBUG: Program node meteorshim.js exited with code 1
DEBUG: Starting child process with 'node meteorshim.js'

After that I destroyed the gear and tried again this time changing the created package.json created by the meteor-shim to node version to '0.10.29' (it had originally said 0.10.9), I run 0.10.29 on my machine.

I bundled and pushed this one, with the same results. So I ssh'ed into the Gear and typed 'node -v' and it outputted

v0.6.20

How do I at least get node version 0.10.26?

Note: The Cartridge in the Application web interface says node.js 0.10

Daniel Toebe
  • 2,719
  • 3
  • 17
  • 18

1 Answers1

3

The answer is you can't get v0.10.26 or later on OpenShift currently. At least not that I know of. v0.10.25 seems to be the latest version you can get on OpenShift at the moment.

Although it shows v0.6.20 doing "node -v" while you're on their system, it's actually running v0.10.25 if you created your app as node v0.10. When you push your code on there, check the output, one of those lines should be:

remote: npm info using node@v0.10.25

I've tried changing the version in package.json as below to see if it works but v0.10.25 is the latest version OpenShift is currently providing:

"engines": {
   "node": ">= 0.10.26",   <<<<< it's not taking this version
   "npm": ">= 1.0.0"
},
Ben
  • 5,024
  • 2
  • 18
  • 23
  • With more messing around I got found this blog post [https://www.openshift.com/blogs/any-version-of-nodejs-you-want-in-the-cloud-openshift-does-it-paas-style](https://www.openshift.com/blogs/any-version-of-nodejs-you-want-in-the-cloud-openshift-does-it-paas-style) and cloned the quickstart repo. Then I added the .openshift file calling 0.10.29. The verbos output said it was installing 0.10.29, and once ssh'ed into my gear I ran node -v, and got 0.10.29, but was still getting 503, and the same error with the tail command. I even restarted, force shutdown, and started the gear up.. no change – Daniel Toebe Jun 20 '14 at 06:11
  • I used to use this to get version 0.10 when OpenShift only offered v0.6. However, OpenShift seems to be few releases behind the latest version. – Ben Jun 20 '14 at 06:19
  • Let me ask, why when I originally ssh'ed into my gear and used node -v I got 0.6, but my app was using 0.10? – Daniel Toebe Jun 20 '14 at 07:23
  • that version 0.6 is in /usr/bin and I believe the version that runs our 0.10 apps is in /opt/rh/nodejs010/root/usr/bin. When deploying, openshift probably does some environment setting (such as path and libraries) to point to this version of node. Back to your original issue, Try specifying the older version of Meteor.Js in the package.json. I believe older version of Meteor.Js might be compatible with node v0.10.25 – Ben Jun 20 '14 at 13:28
  • Yeah that is what I was thinking, but there would be a good possibility that I could run into issues with security and dependencies. I think in the short term I will use Deployd, another full stack node platform. And I will have to keep testing ways around this issue. – Daniel Toebe Jun 20 '14 at 15:18
  • The guide shared by @DanielToebe doesn't work anymore. OpenShift took down that repo, but the guide is still up like it's gospel. – River-Claire Williamson Dec 21 '15 at 17:02