throw e
what is version node you use? I have
$ node -v v0.3.0-pre
and get next result to run test
$ node test.js
node.js:50
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: process.mixin() has been removed.
at EventEmitter.mixin (node.js:13:11)
at Object.
Whatever the latest version was in November of 2009, which unfortunately I don't know.
I would happily accept patches that brought this back into compatibility with the current version of node.js.
with mixin helps next code:
function import(to, from) { for (var key in from) { if (from.hasOwnProperty(key)) { to[key] = from[key]; } } }
//process.mixin(exports, JSONRPC); import(exports, JSONRPC); and server starts (and maybe work properly)
But client.js get new error:
$ node client.js
node.js:63
throw e;
^
Error: Promise has been removed. See http://groups.google.com/group/nodejs/msg/0 c483b891c56fea2 for more information.
at new removed (events:117:9)
at [object Object].call (/var/home/sklyar/node.js/node-jsonrpc/src/jsonrpc.j s:29:23)
at Object.
I cannot dot it because have not enough experience yet :( But maybe information can help you to make update. It seems that "promises" was fully excluded from node.js http://groups.google.com/group/nodejs/msg/0 c483b891c56fea2
Hi all,
a quick patch, replace:
process.mixin(exports, JSONRPC);
with:
function import(to, from) {
for (var key in from) {
if (from.hasOwnProperty(key)) {
to[key] = from[key];
}
}
}
import(exports, JSONRPC);
Hope this helps