-
Notifications
You must be signed in to change notification settings - Fork 3k
Nested git dependency not being installed. #7994
Comments
This is something that will be changing soon with If you need to have a version of C under B's node_modules, you can always run
This should force |
Thanks for your reply! I'm already doing the workaround, but thanks for that too. What's weird is that the current behavior makes
I must be doing something wrong, because surely NPM doesn't mean to break my dependencies just to save space. |
This is a bug, and is related to #7202, if not the same exact bug. Thanks for filing this! Git is a giant forest of edge cases. |
I actually think there was an early misunderstanding in this issue, and I think the behavior, as described, is correct. Given:
I would expect a tree like:
B doesn't install its own copy of C because it can already see and use the copy A got. This is normal behavior. There is a race here in what your tree looks like, because if B's-C gets installed first then A will also get a copy, since A can't use B's-C. But this race won't change the behavior of A nor B. |
Under which circumstances are you getting this error? I don't think it's coming from Node or npm. @iarna is right – and I somehow overlooked this in my earlier response, sorry – that if both |
This may have been a freak issue. Not sure how to reproduce. But after using the "workaround" once, this issue never appeared again. Sorry for all the confusion! I'll be sure to report back here if it happens again. |
I have three Github repos (
A
,B
, andC
).A
depends onB
a lagit://github.com/aleclarson/B.git#1.0.2
.A
andB
depend onC
a lagit://github.com/aleclarson/C.git#1.0.0
.B v1.0.1
is published on NPM, butv1.0.2
isn't because it's unfinished.C
is not published on NPM, as it is a work-in-progress as well.Now, let's install
A
's dependencies a lanpm install
.When I look at
A
's dependencies, theC
dependency is installed just fine.But, when I look at
B
's dependencies, theC
dependency is not installed.C
should be installed inB
'snode_modules
because it's in thedependencies
object insideB
'spackage.json
.No
npm-debug.log
is made afternpm install
inA
's directory. So NPM thinks nothing went wrong.Could this be my own fault? Or is NPM not prepared for a situation like this?
Thanks for any help!
The text was updated successfully, but these errors were encountered: