I don't have a good answer to your question; I think we are struggling with the same problem.
IMHO "npm link" is not suitable for (y)our use case. What you really want to do is put "myLib" in your package.json dependencies, and specify a version, and specify where to fetch it from - and preferably in such a way that this works in both development flows and production flows. So looking at the options from there.. Seems like you can specify git repo's directly in your dependencies. Well I've got my repositories locally on my drive, not running any git servers though, so what now? Setting up a local git server to access these repositories? That seems a bit overkill to me. Setting up your own npm repository? Also feels like overkill. Thinking out loud: I just want to store these modules in a path, perhaps say "npm install <destination-repo> and point to that path, control the path via environment variables, perhaps similar to "maven" repositories as used in the Java world. Multiple versions of the same package need to be stored in the same structure. Thoughts anyone? Antoine On Mon, Jul 8, 2013 at 2:09 PM, Maxim Yefremov <maxy...@gmail.com> wrote: > I have site1 and site2 on one server, they both depend on one library > myLib via npm link. > > I changed myLib for site2 so it might be buggy for site1. How to avoid it? > > I want to use separate versions of myLib for site1 and site2. > > But when I do npm link command for myLib on server then site1 and site2 both > use the same version of myLib > > -- > -- > 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 nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nodejs+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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 nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.