Search code examples
node.jsopenshiftecmascript-harmony

Harmony on Openshift


I'd like to get a simple generator function working on Openshift Online PaaS. I followed the instructions at nodejs-custom-version-openshift to run node 0.12 rather the default 0.10, and added a simple generator function to the bottom of server.js.

I added the harmony flag as per instructed, and it works locally with npm start and node server.js. However on Openshift I get:

DEBUG: Program node --harmony server.js exited with code 8
DEBUG: Starting child process with 'node --harmony server.js'
/var/lib/openshift/0000000000700003a/app-root/runtime/repo/server.js:33
function* idMaker(){
        ^
SyntaxError: Unexpected token *

Is there another, better way to use harmony/generators on Openshift?


Solution

  • Silly me for not looking at the issues page for the Github repo of this custom node version package, but this comment solved it, by adding a line in .openshift/lib/utils. Perhaps this Q/A still useful to someone!