Why I Don't Use React Router
I recently started working seriously with node.js (I&#x27;ve tinkered over the years since it was launched, and we provide some support for it in our products, but never actually built anything with it). I went looking for a library to deal with logins, authentication, password resets, etc. Normal stuff that most web frameworks have some solutions for.<p>I found a package on npm that sounded like it did everything I wanted (plus a few extra things, but I figured I could ignore those). It took longer than I expected to install...so, I did a little digging. It had installed over 53,000 files, and the resulting directory was 110 MB in size!<p>I was absolutely flabbergasted. I couldn&#x27;t believe installing one package, for something seemingly simple, could balloon up that large. I won&#x27;t name names, as I did a little more poking around, and realized that <i>most</i> npm installations pull in thousands of files via automatic dependency resolution, though this one was a particularly egregious example. I&#x27;ve gotten to where I only install stuff via npm when I&#x27;m on a free connection; I normally work on mobile broadband, which is very expensive (and adds up to almost $300&#x2F;month even before I started playing with npm).<p>Now, to be fair, it was pulling in a web framework...maybe Express or Hapi, I don&#x27;t remember which, and all of <i>its</i> dependencies, so it was actually a lot more than just the login module. The kind of annoying bit was I already had a global installation of both of those frameworks from following tutorials, but it still seemed to insist on pulling in its own preferred versions of stuff, and putting them into the project directory.<p>I come from the Perl world, where if you don&#x27;t spend at least half your time looking for and evaluating libraries <i>before</i> you start writing code, you&#x27;re not being very productive. I&#x27;m, frankly, overwhelmed by how big and unfiltered the npm ecosystem is. I&#x27;ve found myself relieved to start tinkering with more &quot;all in one&quot; libraries and frameworks, because I don&#x27;t have the time or knowledge to evaluate libs on my own. I ordinarily prefer a more a la carte approach, where you just pull in what you need, and so big libraries and frameworks don&#x27;t fit that. But, I can&#x27;t make sense out of the ecosystem without some guidance. There are over 70,000 npm packages! Curation really has turned out to be one of the big problems in computer science.