Open juodumas opened 9 years ago
i have same issue
Hi,
I have the same problem. Any idea or workaround?
Thanks.
Until this is solved, have a look at this auto-updating Node.js cartridge.
Thanks Icflorescu. It works for me.
I'd be interested in getting this fixed if possible, thanks.
I found a workaround.
the cartridge is calling a nodjs_context() function before launching node. This function checks $OPENSHIFT_NODEJS_VERSION and if it is 0.10 make a call that ends up adding the path to node v0.10 before everything else.
My workaround was to edit .openshift\lib\utils and add export OPENSHIFT_NODEJS_VERSION=0.6
in the setup_path_for_custom_node_version() function.
How it looks after the edit:
.openshift\lib\utils
# Add the node binary path to the PATH.
export OPENSHIFT_NODEJS_VERSION=0.6
export PATH="$node_bin_path:${PATH}"
I can't assure that there is no side effects, but my app is now running on node v0.12
Thanks @Spouwny. That did the trick for me. I'm running v5.1.0 just fine now.
@Spouwny worked for me too. I mistakenly set OPENSHIFT_NODEJS_VERSION
to 4.2.4
in the utils script. It's important, like you mentioned, that it's set to 0.6
, EVEN IF YOU'RE NOT RUNNING 0.6. Wasted almost a day on this.
@Spouwny - works for me, cheers.
I need to install the latest version of nodejs and mongodb
Thanks All!
I've added @Spouwny's fix to .openshift\lib\utils
and bumped the default nodejs version to 5.9.0
.
I had originally posted this content as a quick hack to demonstrate how someone could provide their own custom runtime on OpenShift (V2) using the .openshift
application startup hooks. However, the nodejs runtime should ideally be provided by the platform (or by a cartridge).
I'd recommend trying @icflorescu's openshift-cartridge-nodejs in the future, since it offers a cleaner separation between the application sources and the javascript runtime.
Looks like there is a problem with PATH. App starts with 0.10.25, but
node --version
via SSH reports 0.12.0... Maybe OpenShift has changed something?To reproduce:
rhc app create nodeapp nodejs --from-code=git://github.com/ryanj/nodejs-custom-version-openshift.git
console.log('VERSIONS', process.versions);
toserver.js
, git push.rhc tail
output after pushing: