multi-node icon indicating copy to clipboard operation
multi-node copied to clipboard

proccess.binding("net") - No such module

Open wankdanker opened this issue 14 years ago • 11 comments

When using multi-node with node v0.5.10, I receive the following error:

node.js:202 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: No such module at Object. (/lib/multi-node/multi-node.js:5:23) at Module._compile (module.js:432:26) at Object..js (module.js:450:10) at Module.load (module.js:351:31) at Function._load (module.js:310:12) at Array. (module.js:470:10) at EventEmitter._tickCallback (node.js:194:26)

Which is referring to netBinding = process.binding("net");

wankdanker avatar Oct 25 '11 20:10 wankdanker

I get this too.

crufter avatar Dec 04 '11 12:12 crufter

I found this thread: https://github.com/joyent/node/issues/1373. As one of the commenters said "The error is actually just from attempting process.binding('net'), a builtin only available on posix atm.".

So probably you are trying to use this module on windows as me, thats why it pops up.

crufter avatar Dec 22 '11 10:12 crufter

As far as I am aware, binding("net") was actually removed in v0.5 and later. Anyway, I'm using the cluster module that is included with the node core to do the things that multi-node did. If you need a solution, I have posted a gist of my SimpleCluster module: https://gist.github.com/1510680

wankdanker avatar Dec 22 '11 15:12 wankdanker

is there any solution for this?

dmich avatar Dec 23 '11 22:12 dmich

The solution I went with was to use node's cluster module (http://nodejs.org/docs/latest/api/cluster.html). I created an easy to use wrapper as seen in https://gist.github.com/1510680. But as for a solution to fixing multi-node, I don't know. Sorry.

wankdanker avatar Dec 23 '11 23:12 wankdanker

Thank you, but I'm looking for the fix in multi-node.

dmich avatar Dec 24 '11 19:12 dmich

Hello, I have also the same problem, but I am new to this and I do not know how to install the simplecluster solution which is at https://github.com/kriszyp/multi-node/issues/14

I am very new unfortunately, and it would mean so much to me if someone could give me a dummy-prove step by step guide to 'install' this module ( I have never installed any module before, only recently stumbled into the world of node js and still exploring ) Help is appreciated and thanks so much

bendy00123 avatar May 10 '12 16:05 bendy00123

@bendy00123 : I just replaced the code in node_modules/webworker/lib/webworker.js with the code from wankdanker https://gist.github.com/1510680. (I kept the name webworker.js). Worked for me, but i think this is not a waterproof solution. Maybe you have to change more in your code...

@wankdanker :+1: Thanks man.

MichaelMoeller avatar Jan 18 '13 23:01 MichaelMoeller

I also had the issue when I first tried with it with current latest nodejs version. So, as there isn't any alternative around, I have created my own. I just recently published in github here: clustered-node , which work pretty much same way as this. Hope that may help you. Thanks.

ranacseruet avatar Oct 20 '14 05:10 ranacseruet

still having this issue in 2015

majamusan avatar May 20 '15 09:05 majamusan

I'm not sure how this issue got closed. A solution from @MichaelMoeller was proposed, but I can't fathom how it works: The API provided in the gist to which he links is completely different from that provided by webworker.js, so how could a straight copy and paste replacement possibly work? The gist is a module exporting a single symbol, start, while the webworker.js module also exports a single symbol, Worker. Isn't a drop-in replacement guaranteed to fail? Any details, Michael?

nathancarter avatar Sep 13 '17 13:09 nathancarter