Hacker News new | past | comments | ask | show | jobs | submit login

Why put 500mb worth of downloadable dependencies in your source tree? This sounds like a terrible thing to do.



This is the default behavior of npm. The most popular package manager on the planet.

It might not be technically the most superior way to do things, but given the widespread use, tooling around it need to be compatible.


It puts those deps in your source tree, sure, but no one advocates committing them to your repository except in few specific scenarios.

This kind of thing is also pretty much standard for most programming languages today.


> This kind of thing is also pretty much standard for most programming languages today

No, it is not. Have a look at java, golang or rust. None of those languages advocate for embedding deps in your source tree as it's quite clearly a terrible anti-pattern to follow.

I wouldn't consider how JavaScript does stuff a good example.


Isn’t parent explicitly trying to avoid committing the node_modules?


It seems to me bitcharmer was railing against the notion that you would have X MB of dependencies in your project folder. I was just pointing out that this is basically standard practice today(and the alternatives are usually awful) and that even if you do have your deps in the project folder, you don't usually check them into version control, so his entire point is moot.


500 MB may be excessive for git, but it is a good practice to check in your compiler together with your source if you use perforce. It’s just an extreme case of monorepo.


Why have 500mb of dependencies if they dwarf your app and are too large to have in your source tree?


Have used node.js, I find this, conceptually, much more simple to trace through than search paths.

Of course there are major cons.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: