npm
Abbreviation · Open Source · Origin: 2010
Definitions
npm is the default package manager for Node.js, providing a command-line tool and an online registry that hosts over two million JavaScript packages. Originally standing for Node Package Manager (though the organization now says it is not an acronym), npm enables developers to install, share, and manage dependencies for JavaScript projects. The npm registry is the largest software package registry in the world. A project's dependencies are declared in a package.json file, and npm install downloads them into a node_modules directory. npm also handles versioning through semantic versioning (semver) and provides scripts for common tasks like building, testing, and starting applications. The ecosystem has faced challenges including dependency hell (deeply nested dependency trees), security incidents from malicious packages, and the left-pad incident of 2016 that briefly broke thousands of projects. Alternatives include Yarn (developed by Facebook) and pnpm, which offer different performance and dependency management approaches.
In plain English: The world's largest collection of reusable JavaScript code — a massive library of pre-built components that developers can instantly add to their projects.
Etymology
- 2009
- Isaac Z. Schlueter begins work on npm (Node Package Manager) to solve dependency management for Node.js.
- 2010
- npm launches publicly alongside Node.js, establishing a centralized package registry for JavaScript.
- 2016
- The left-pad incident (an 11-line package is unpublished, breaking thousands of builds) exposes fragility in the npm ecosystem.
- 2020s
- npm is the world's largest software registry with over 2 million packages. Yarn and pnpm compete as alternative package managers.
Origin Story
The Package Manager Born from Node.js Frustration
When Isaac Z. Schlueter started building npm in 2009, the Node.js ecosystem was still a Wild West of manually downloaded scripts and ad hoc dependency management. Schlueter, who had been working with server-side JavaScript since its earliest days, recognized that Node.js would never reach its potential without a reliable way to share and reuse code. Drawing inspiration from CPAN (Perl), RubyGems, and apt-get, he created npm, short for 'Node Package Manager,' though Schlueter has sometimes playfully insisted it is a recursive bacronym for 'npm is not an acronym.' Released in January 2010, npm shipped with Node.js itself starting with version 0.6.3, giving every Node developer an instant gateway to a growing library of open-source packages. The registry exploded in popularity, surpassing every other language ecosystem in raw package count by 2016. In 2020, GitHub (owned by Microsoft) acquired npm, Inc., cementing its role as the backbone of modern JavaScript development. Today the npm registry hosts over 2 million packages and processes billions of downloads every week.
Coined by: Isaac Z. Schlueter
Context: Created as a package manager to bring dependency management to the nascent Node.js ecosystem.
Fun fact: The npm registry once hosted a package called 'left-pad' consisting of just 11 lines of code. When its author unpublished it in 2016, it broke thousands of builds worldwide, including at Facebook and Airbnb, triggering a policy change that prevents packages from being unpublished after 72 hours.