I believe the reason it does this is so that packages may have 
differently-versioned dependencies. Right now they're the same, but let's say 
the top-level package upgraded to a newer version of formidable that connect 
was not prepared to support. It would be necessary for connect to have its own 
copy of the older version of the package.

Hope that makes a little more sense!

-Matt

On Mar 20, 2012, at 7:29 PM, Fredrik Larsson wrote:

> I don't know if I just don't understand why and there is a really good reason 
> why it behaves the way it does.
> I tried searching but I could not find anything relevant and the docs were 
> equally uninformative regarding this type of problem.
> 
> I might be a neat-freak but I dislike the same modules being installed 
> multiple times, it disturbs my sense of order :)
> 
> I started by installing mime, qs, formidable and mkdirp globally and then 
> continued to install connect. I made very sure that the versions of the 
> modules I installed were the exact versions required by connect.
> 
> Below is a modified output of tree command which shows that connect still 
> installed it's dependencies even though the modules were already installed.
> 
> .                                              
> +-- connect                                    
> ¦   ¦
> ¦   +-- node_modules                           
> ¦       +-- formidable                         
> ¦       +-- mime                               
> ¦       +-- qs                                 
> +-- formidable                                 
> ¦   
> +-- mime                                       
> ¦   
> +-- mkdirp                                     
> ¦
> +-- qs
> 
> I verified with diff -r that the formidable code is identical in both 
> sub-trees, only a few lines of configuration (that I suspect that npm changed 
> depending on how the module was installed) differs.
> 
> What's up with this ? 
> 
> -- 
> 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