@Anand, yep, but you can use `npm link mymodule`

--
Att,
Alan Hoffmeister


2012/5/27 Anand George <[email protected]>

> Coming back to your question
>
> npm install -g mymodule will not be available when you require it using
>
> mymodule = require('mymodule')
>
> See
> http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/
>
> On Sun, May 27, 2012 at 5:14 PM, Alan Hoffmeister <
> [email protected]> wrote:
>
>> @mscdex that's it.
>>
>> I need this to parse config files, and now I can require() my parser from
>> everywhere without the need to send the app path :)
>>
>> --
>> Att,
>> Alan Hoffmeister
>>
>>
>>
>> 2012/5/27 Anand George <[email protected]>
>>
>>> Ok. I get it now. And thanks for both solutions offered. Guess it's
>>> useful in cases like the socket.io implementation where you wish to
>>> link some client-side libraries in the path.
>>>
>>>
>>> On Sun, May 27, 2012 at 11:10 AM, mscdex <[email protected]> wrote:
>>>
>>>> On May 26, 11:33 pm, Anand George <[email protected]> wrote:
>>>> > Next run app.js and the console logs
>>>> >
>>>> > /home/anand/node/Testing/dirpath
>>>>
>>>> I think he wants the path of app.js from the module, so: '/home/anand/
>>>> node/Testing/pathtest' is what he is expecting.
>>>>
>>>> --
>>>> Job Board: http://jobs.nodejs.org/
>>>> Posting guidelines:
>>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nodejs" group.
>>>> To post to this group, send email to [email protected]
>>>> To unsubscribe from this group, send email to
>>>> [email protected]
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>>
>>>
>>>  --
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines:
>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>
>>  --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>  --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to