Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throw e #1

Open
vinnitu opened this issue Oct 12, 2010 · 3 comments
Open

throw e #1

vinnitu opened this issue Oct 12, 2010 · 3 comments

Comments

@vinnitu
Copy link

vinnitu commented Oct 12, 2010

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. (/home/victor/temp/javascript/node-jsonrpc/test/test.js:69:9)
at Module._compile (node.js:316:23)
at Object..js (node.js:324:12)
at Module.load (node.js:250:25)
at Object.runMain (node.js:338:24)
at Array. (node.js:588:12)
at EventEmitter._tickCallback (node.js:42:22)
at node.js:604:9

@ericflo
Copy link
Owner

ericflo commented Oct 12, 2010

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.

@vinnitu
Copy link
Author

vinnitu commented Oct 13, 2010

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. (/var/home/sklyar/node.js/node-jsonrpc/examples/client .js:6:8)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at Object.runMain (node.js:522:24)
at Array. (node.js:756:12)
at EventEmitter._tickCallback (node.js:55:22)
at node.js:768:9

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

@Reggino
Copy link

Reggino commented Nov 7, 2010

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants