When I launch my NodeJS server, I have this error :
I have this error now :
...
17 Jun 04:00:38 Running plugAPI v.2.2.3
DEBUG: /var/lib/openshift/xxxxxxxxxxxx/app-root/runtime/repo/node_mo dules/request/index.js:50
opts = util._extend({}, uri);
^
DEBUG: TypeError: Object #<Object> has no method '_extend'
at request (/var/lib/openshift/xxxxxxxxxxxx/app-root/runtime/rep o/node_modules/request/index.js:50:17)
at connectChat (/var/lib/openshift/xxxxxxxxxxxx/app-root/runtime /repo/node_modules/plugapi/bin/client.js:49:116)
at queueTicker (/var/lib/openshift/xxxxxxxxxxxx/app-root/runtime /repo/node_modules/plugapi/bin/client.js:37:337)
at queueConnectChat (/var/lib/openshift/xxxxxxxxxxxx/app-root/ru ntime/repo/node_modules/plugapi/bin/client.js:48:241)
at [object Object].connect (/var/lib/openshift/xxxxxxxxxxxx/app- root/runtime/repo/node_modules/plugapi/bin/client.js:68:270)
at Object.<anonymous> (/var/lib/openshift/xxxxxxxxxxxx/app-root/ runtime/repo/server.js:11:5)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
DEBUG: Program node server.js exited with code 1
DEBUG: Starting child process with 'node server.js'
17 Jun 04:00:39 Running plugAPI v.2.2.3
DEBUG:
DEBUG: /var/lib/openshift/xxxxxxxxxxxx/app-root/runtime/repo/node_mo dules/request/index.js:50
DEBUG: opts = util._extend({}, uri);
DEBUG:
DEBUG:
...
I'm on NodeJS version :
[xxxxxxxx.rhcloud.com xxxxxxxxxxxx]\> node -v
v0.6.20
And I've add var util = require('util');
in my top script.
Friendly, Pirmax.
Running "node server.js" manually on openshift won't work. When you push your code there, by looking at the log, it does many things before starting the server (so you don't need to start it yourself). Your server will be automatically restarted every time you push your change onto OpenShift. If you need to start/stop/restart your server, you need to use OpenShift's client tool. Instruction how to install here: OpenShift Client
After installing and setting up (rhc setup). Type "rhc" from command prompt for usage. You can start/stop/restart your server by typing the following at the command prompt:
$ rhc app-start your_app_name
$ rhc app-stop your_app_name
$ rhc app-restart your_app_name