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

Marek Majkowski majek04 at gmail.com
Thu Oct 27 15:24:12 BST 2011


On Thu, Oct 27, 2011 at 15:18, Chris Adkin <chris1adkin at yahoo.co.uk> wrote:
> Thanks for responding to my question.
> I did have the line you mentioned in one of my js files, however I removed
> it because I was getting an error stack something like this:-
>
>  Error: require.paths is removed. Use node_modules folders, or the NODE_PATH
> environment variable instead.
>         at Function.<anonymous> (module.js:360:11)
>         at Object.<anonymous>
> (/home/olostan/node_modules/less/lib/less/index.js:5:8)
>         at Module._compile (module.js:420:26)
>
> I understand that this is nuance of certain version of node.js, which
> version are you using, because I'm guessing that you do not encounter this
> problem ?.

Yes, I'm running node.js 0.4.x.
I don't know how it works in 0.5. Try googling for NODE_PATH.

Marek

> From: Marek Majkowski <majek04 at gmail.com>
> To: ChrisAdkin <chris1adkin at yahoo.co.uk>
> Cc: rabbitmq-discuss at lists.rabbitmq.com
> Sent: Thursday, 27 October 2011, 14:00
> Subject: Re: [rabbitmq-discuss] "sockets module" for rabbitmq.js example
>
> On Thu, Oct 27, 2011 at 13:44, Marek Majkowski <majek04 at gmail.com> wrote:
>> 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('..');
>
> You also need `socket.io` version `0.6.18`.
>
> Marek
>
>
>


More information about the rabbitmq-discuss mailing list