[rabbitmq-discuss] "sockets module" for rabbitmq.js example

Marek Majkowski majek04 at gmail.com
Thu Oct 27 13:44:47 BST 2011


On Wed, Oct 26, 2011 at 22:46, ChrisAdkin <chris1adkin at yahoo.co.uk> wrote:
> I'm trying to get the example working as per the rabbitmq + node.js posting
> (http://www.rabbitmq.com/blog/2010/11/12/rabbitmq-nodejs-rabbitjs/). I
> follow the example, but when I run node example/socketio.js it falls down
> with:-
>
> node.js:202
>        throw e; // process.nextTick error, or 'error' event on first tick
>              ^
> Error: Cannot find module 'sockets'
>    at Function._resolveFilename (module.js:334:11)

This looks like a path problem. Try adding this to js files in
examples directory:
require.paths.unshift('..');

Cheers,
  Marek


More information about the rabbitmq-discuss mailing list