left-pad

lore

programmingweb dev

The eleven-line npm package whose 2016 removal broke builds across the JavaScript world.

In March 2016, developer Azer Koculu unpublished his modules from npm after a naming dispute involving the registry and a company's trademark claim; among them was left-pad, eleven lines that padded strings, on which thousands of packages including Babel transitively depended. Builds failed globally within minutes, npm restored the package against its author's wishes, and un-unpublishing entered the vocabulary. The incident forced the ecosystem to confront dependency depth, registry governance, and how much of the modern web rested on one person's weekend function.

In March 2016 a developer unpublished a small npm package called left-pad after a dispute over a different package's name. The module was eleven lines long and padded a string. Its removal broke builds across a substantial part of the JavaScript ecosystem, including projects at companies with no idea they depended on it.

The mechanism is the lesson rather than the drama. Nothing depended on left-pad directly; it was a transitive dependency of tools that everything depended on, so the failure arrived through a chain nobody had inspected. Modern dependency trees are deep enough that a project can have hundreds of packages it never chose, maintained by people it has never heard of, any one of whom can remove their work.

The responses were structural. npm changed its unpublish policy so widely-used packages cannot simply vanish, lockfiles and vendoring became standard practice, and the incident is now the reference point for supply-chain risk conversations. The deeper question it raised has not gone away: an ecosystem that rewards tiny reusable modules produces exactly this fragility, and the trade between reuse and dependency surface is still being argued about, now with malicious takeovers rather than accidental removal as the scenario.

All glossary entries