I have 3 node.js modules, A, B and C. All of them private git repos. A depends on B depends on C. Git cloning A and doing npm install works like a charm.
But while coding on module A, i want to work on B (and C) as well. The latter two are git cloned too. And npm link ../pathto/B works well.
And as B depends on C, npm link took care of "installing" C into B/node_modules/C. Its a static file clone, that's being used by B.
So when doing npm link ../pathto/C, it results in A/node_modules/C (being a symbolic link).
But, and thats the problem, B will use its static clone of C, rather than what i have linked into A/node_modules/C.
A/
...
node_modules/
B -> B/
C -> C/
B/
...
node_modules/
C/
...
C/
...
Does anyone have an idea to work around this?
I solved it, or at least i got it working.
After npm install i do npm link _node_modules/* (_node_modules is the directory where my local modules B and C reside in).
So far B gets required as planned. But still B loads its static C reference.
Then i simply cd to _node_modules/B/node_modules and perform npm link C.