-
Notifications
You must be signed in to change notification settings - Fork 3k
local private module dependencies #2442
Comments
I think |
yeah that would be great, if it makes sense to isaac, I might be missing something |
Running In any case a bundled dependency is probably bundled for the very reason of avoiding simple In your own use case you should have not only bundled your unpublished modules to the parent module's npm package — that's not enough; you should also have copied and added children's dependencies to the parent module's Then Problem solved. |
Definitely +1 to this issue. FYI that this is probably covered through a combination of #1341 and #1558.
I don't believe this is a recommended practice. It goes against the whole purpose of modularity -- you'll have to keep your own package.json in sync with the module's. And indeed, this won't support conflicting dependencies, which was the reasoning behind npm 1.0's move to local node_modules. |
yeah.. that wont really help me here, that's like going back to git submodules |
@isaacs this is the thing I was talking about at the conf. I'll still try the git repo route but it's a little limiting since we're using github to host the repos and we're already at our private repo limit |
Not sure what the git repo route is exactly, but if it's specifying your deps as git URLs, we tried that too and found that a bit inflexible to use -- e.g. in staging, you want to use the |
the biggest problem for us with the git repo thing is just the amount of private repos we would need. The solution @mmalecki mentioned sounds reasonable to me but I know isaac mentioned those are strictly untouched by npm by design so maybe we need something else |
npm should definitely do this. At the moment, bundledDependencies are just ignored. It would be best if npm skipped the unpack step, but still traversed into the child folders to see what needs to be done. It wouldn't be terribly hard to do. |
haha this is our clean install time since it has to loop each dep:
|
with all the duplicates we have over 12,000 require()s now and booting takes about 5s hahaha :D |
@visionmedia You should try running |
k cool I will take a look at that |
+1 |
9 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1. I just got bitten by this one too, and I just couldn't figure out why dependencies weren't getting installed...! |
+1 |
3 similar comments
+1 |
+1 |
+1 |
ok, just to make sure I am getting this right:
|
@robertkowalski That seems to be the desired behaviour yes. (It's also what I expected when I added a bundledDependency and gave it a package.json like a good boy scout would and ran npm install on my base module) |
Just got bitten by this as well, +1 |
I am writing a module that has twenty-five (!)
Yes, absolutely, please. |
Currently, we're doing this for copying deps (which looks for subdeps and copies them, similar to @mercmobily's solution). I've been struggling with the best way to do this as well-- was thinking maybe a script that makes a one-time-use In case this helps anyone, here's a similar script that looks at a |
…2442 need to do that ourselves
bump (Ouch!) 👍 |
@mikermcneil Ugh I wish I had used a script as well. Right now I did the "checking" work manually, and live with the thought that when/if this bug is fixed, I will have to go through everything and take out the redundant dependences from my main package... |
+1 :D |
+1 |
was this ever resolved? I could be misunderstanding, but it seems because of this issue the behavior of bundledDependencies doesn't align with the documentation |
I don't think this will be ever (or soon) resolved. See above. I personally cannot see any automated solution to prevent indefinite recursive libs fetching. What could be done - some additional config variable with list of dependencies that must be fetched even if they exist in parents. Just in case here is my recent talk on the topic http://nkbt.github.io/nnj with failing example and couple of ways to solve the issue. |
Thanks @nkbt for your link! How do others manage its local private node.js modules and libraries? |
We recently landed a new feature that allows you to |
Hi, The documentation says: "This feature is helpful for local offline development and creating tests That's not quite my use case. In my use case, I have Hotplate which in turn I am not sure what you are saying actually closes this ticket...? Merc. On 16 September 2014 11:58, Forrest L Norvell notifications@github.com
|
@othiym23 Nice addition. I will give that a try - looks good! :) |
@othiym23 This is so amazing. Thank you! |
There are two parts (at least) to this issue -- one is being able to effectively us local dependencies (which is what the issue is titled after), and another is ensuring that dependencies (including |
Thanks Forrest. Which one is the ticket that @iarna is working on, about the multi-stage install? I |
There isn't a specific tracking issue for your particular use case, so can you open a new issue describing it (as concretely as you're able)? The multi-stage install project is meant to rework the installation process so that it figures out exactly which dependencies are missing, and then installing all of them in a single pass. It seems entirely in scope for bundledDependencies to be included as part of that dependency tree realization, but an explicit use case (or maybe even… a failing test 😍) would be very useful. |
hey hey, looking for your thoughts or suggestions on this issue. What I wanted ideally is to modularize our app(s) using vanilla node_modules, however they are not in any registry so they're checked into the repo.
$ npm install
see's that they're already installed and ignores them, even if their own dependencies might not be installed. I have bigger plans for this so ideally avoiding a shell script to iterate and$ cd node_modules/pkg && npm install
if possible.Any suggestions for this use-case? maybe if
"private": true
is specified (or similar) npm could check the deps.The text was updated successfully, but these errors were encountered: