在Openshift上自定义node.js版本

时间:2015-01-15 00:01:34

标签: node.js shell openshift

我在开放班次的node0.10磁带上运行自定义节点版本时遇到问题,您可以找到here

我可以很好地安装新节点版本,但是开放式移位会继续使用旧节点10.25

取消合作日志:

remote: Activating deployment
remote:   - Checking to see if Node.js version 0.10.33 is installed ... 
remote:   - Node.js version 0.10.33 is already installed
remote: 
remote:   - pre_start_nodejs: Adding Node.js version 0.10.33 binaries to path
remote: -this is the path: /var/lib/openshift/54b6ea6e4382ece151000039/app-root/data/node-v0.10.33-linux-x64/bin:/var/lib/openshift/54b6ea6e4382ece151000039/app-root/runtime/repo/node_modules/.bin:/var/lib/openshift/54b6ea6e4382ece151000039//.node_modules/.bin:/opt/rh/nodejs010/root/usr/bin:/bin:/usr/bin:/usr/sbin 
remote:   - PATH set to include custom node version (0.10.33) from
remote:        /var/lib/openshift/54b6ea6e4382ece151000039/app-root/data/node-v0.10.33-linux-x64/bin 
remote:     PATH = /var/lib/openshift/54b6ea6e4382ece151000039/app-root/data/node-v0.10.33-linux-x64/bin:/var/lib/openshift/54b6ea6e4382ece151000039/app-root/runtime/repo/node_modules/.bin:/var/lib/openshift/54b6ea6e4382ece151000039//.node_modules/.bin:/opt/rh/nodejs010/root/usr/bin:/bin:/usr/bin:/usr/sbin
remote: Starting NodeJS cartridge

一切看起来都棒极了,直到我运行的应用程序说:10.25 ......

rhc tail:

v0.10.25

/opt/rh/nodejs010/root/usr/bin:/opt/rh/v8314/root/usr/bin:/var/lib/openshift/54b6feb9e0b8cd56c00000e1/app-root/data/node-v0.10.33-linux-x64/bin:/var/lib/openshift/54b6feb9e0b8cd56c00000e1/app-root/runtime/repo/node_modules/.bin:/var/lib/openshift/54b6feb9e0b8cd56c00000e1//.node_modules/.bin:/opt/rh/nodejs010/root/usr/bin:/bin:/usr/bin:/usr/sbin

undefined

即使我rhc ssh到我的应用并尝试node -v,我也会获得10.33 ...

在开始时间PATH env被覆盖并导致节点使用旧的bin ...

PS:我正在尝试部署Meteor应用程序(1.0.2.1)

1 个答案:

答案 0 :(得分:2)

没关系,想通了: - )

如果您想使用自定义节点@openshift,请查看this repo

希望我能帮助别人!