To be more specific, I don't want access to any instance of 'bar', e.g. if 
it appears elsewhere. I want the actual cached instance used by 'foo'.

On Thursday, June 28, 2012 9:05:00 AM UTC-4, deitch wrote:
>
> Let us say I have installed a standard npm module, 'foo' (any resemblance 
> to real modules is unintended and purely coincidental). foo, in turn, 
> requires bar. After running 'npm install foo;, my root directory will look 
> like:
>
> app.js
> node_modules/
> ..foo/
> ..package.json
> ....node_modules/
> ......bar/
>
> (irrelevant details left out). 
>
> From my root directory, I can do require('foo') and load foo. 
>
> What if I want access to 'bar'? I *cannot* do require('bar') because it is 
> not in my node_modules path.
>
> How do I access the 'bar' package from my app?
>  
>

-- 
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