albertyw/albertyw.com

View on GitHub
app/notes/20190211-0317.md

Summary

Maintainability
Test Coverage
There Are Too Many NPM Packages

too-many-npm-packages

1549855057

I was trying to add modal popups to a website today and trying not to reinvent
the wheel and instead use a pre-existing modal package from NPM.  However, upon
searching for a good package, I found that [NPM has 2366 modal packages](https://www.npmjs.com/search?q=modal).

There's a huge amount of duplicated work here, including lots of packages that
integrate with react, bootstrap, vue, browserify, or whatever.  Trying to sort
packages by popularity or quality gives little benefit and the [package that
actually owns the "modal" name](https://www.npmjs.com/package/modal) seems
to be dead with people publishing their own
[dead forks](https://www.npmjs.com/package/simple-modal).

My suspicion is that this is a systemic issue from the node community's encouragement
of creating tons of [micro-packages](https://www.npmjs.com/package/left-pad)
multiplied by the ever-increasing number of new javascript web frameworks but
other package indices have similar problems.  I feel that package managers
should do a better job at either recommending well-supported packages or
create a higher barrier of entry to people creating new packages.  Maybe
someone should try namesquatting package names and see where that goes?