NPM

I swear there is no part of the Node ecosystem that isn’t a flaming tire fire. Does anyone ever design anything before implementing it anymore?

Try this example:

  • NPM is a package manager. But you can’t install packages from local source (i.e., on this computer) in older versions because NPM was only really designed to work with a single remote repository. (New versions at least let you add multiple remote repositories, as a somewhat hacky extension.)
  • There’s a workaround hack feature called npm link that lets you set up a symbolic link — a pointer — to a local package. It doesn’t work like a standard link command, so you’ll have some relearning to do if you want to use it.
  • But nevermind that learning, because npm link has no shortage of problems and bugs and failings and workarounds and workarounds to the workarounds. Also, it has disastrous data-destroying bugs on Windows.
  • But nevermind the bugs, because it’s not compatible with the normal npm install commands anyway, so the one use case you’ll have for it — installing packages from a local directory to make sure your design works — isn’t really usable with it anyway.

None of that would have been an issue with a little more advance thinking and a little less advance typing. Two small design changes early on — (1) allow multiple repositories to be listed in .npmrc and check them in order, and (2) allow the file:// protocol to point to a local directory of .zip files or tarballs as a repository — would have been enough to obviate all of this. NPM scopes, link, yalc, lerna, and a dozen other things built on top of the initial bad design would have been completely unnecessary.

But, no, can’t spend time on that! — you gotta move fast, be first, break things, change the paradigm, own the market, declare your IPO, and retire like a king. Never, ever design or plan anything, because that takes too long! Just shove something barely-passable out the door, and if enough people use it, make a slightly better layer on top to hide the roughest parts, and then if that gets used, another on top of that, and after enough layers, you might not even notice the sand you built on. After all, when you’re changing the world, who cares if anything actually works?

Comments Off on NPM

Filed under Uncategorized

Comments are closed.