that's it. tell the package manager to install it in the right place.
the other point, the "local link". you can do this yourself:
ln -s yourLib ./node_modules/yourLib
the problem with it is, that nearly every developer has it's own dir layout. the way npm ln works is the only simple way to be sure where to find the lib you wanna link into your project. i'm sure Isaac can name more arguments for his decision.
there is another solution: publish your lib, which you wanna link, or pack it and place the tar on restricted server (we did that in one project, jenkins backed, works well)
Am Montag, 25. März 2013 13:53:00 UTC+1 schrieb kapouer:
"npm link" shouldn't behave like "npm -g link"
NB: this has nothing to do with the way node or npm is installed,
while it is true that node end up in /usr, package managers have npm
configured to global-install modules to /usr/local by default.