Npm

Edit · View history

Introduction

npm (originally short for Node Package Manager) is a package manager for the JavaScript programming language managed by npm, Inc. It is the default package manager for the Node.js runtime environment. npm consists of a command-line client, also called npm, and an online database of public and paid-for private packages, called the npm registry. The registry is accessed via the client, and the available packages can be browsed and searched via the npm website.

History

npm was created by Isaac Z. Schlueter and first released in 2010. Its development was sponsored by the hosting company Joyent, which employed Schlueter at the time. The project was designed to solve the problem of sharing reusable JavaScript code, especially for server-side Node.js development. In 2014, npm, Inc. was founded as a separate company to manage both the open-source client and the registry. The npm registry grew rapidly, becoming the largest package ecosystem for any programming language. In 2020, npm was acquired by GitHub, a subsidiary of Microsoft. The acquisition ensured continued development and integration with GitHub’s platform.

Features

Usage

The npm client is typically invoked from the command line. Common commands include:

The registry hosts over two million packages (as of the mid-2020s), making npm one of the largest software registries in existence. The client is open-source software released under the Artistic License 2.0.