NPM is the world’s largest software registry. Open source developers from every continent use NPM to share and borrow packages, and many organizations use NPM to manage private development as well.
NPM consists of three distinct components:
- the website
- the Command Line Interface (CLI)
- the registry
Use the website to discover packages, set up profiles, and manage other aspects of your NPM experience. For example, you can set up organizations to manage access to public or private packages.
The CLI runs from a terminal, and is how most developers interact with NPM.
The registry is a large public database of JavaScript software and the meta-information surrounding it.
- Adapt packages of code for your apps, or incorporate packages as they are.
- Download standalone tools you can use right away.
- Run packages without downloading using npx.
- Share code with any npm user, anywhere.
- Restrict code to specific developers.
- Create organizations to coordinate package maintenance, coding, and developers.
- Form virtual teams by using organizations.
- Manage multiple versions of code and code dependencies.
- Update applications easily when underlying code is updated.
- Discover multiple ways to solve the same puzzle.
- Find other developers who are working on similar problems and projects.
To get started with NPM, you can create an account, which will be available at http://www.npmjs.com/~*yourusername*.
After you set up an NPM account, the next step is to use the command line interface (CLI) to install npm. We look forward to seeing what you create!
Sharing packages and collaborating with others
If you choose to share your packages publicly, there is no cost. To use and share private packages, you need to upgrade your account. To share with others, create organizations, called npm organizations, and invite others to work with you, privately (for a fee) or publicly (for free). Or you can sign up for a private instance of NPM for your company, called npm Enterprise, so you can develop packages internally that are not shared publicly.
To learn more about NPM as a product, upcoming new features, and interesting uses of NPM, sign up for our newsletter at npm-weekly, and be sure to follow @npmjs on Twitter.
For mentoring, tutorials, and learning, visit node school. Consider attending or hosting a nodeschool event (usually free!) at a site near you, or use the self-help tools you can find on the site.
While relevant CLI commands are covered throughout this user documentation, the CLI includes command line help, its own documentation section, and instant help (man pages).
- Setting up your npm user account
- Managing your npm user account
- Paying for your npm user account
- Configuring your local environment
- Troubleshooting
- Introduction to packages and modules
- Contributing packages to the registry
- Creating a package.json file
- Creating Node.js modules
- About package README files
- Creating and publishing unscoped public packages
- Creating and publishing scoped public packages
- Creating and publishing private packages
- Package name guidelines
- Specifying dependencies and devDependencies in a package.json file
- About semantic versioning
- Adding dist-tags to packages
- Updating and managing your published packages
- Changing package visibility
- Adding collaborators to private packages owned by a user account
- Updating your published package version number
- Deprecating and undeprecating packages or package versions
- Transferring a package from a user account to another user account
- Unpublishing packages from the registry
- Getting packages from the registry
- Searching for and choosing packages to download
- Downloading and installing packages locally
- Downloading and installing packages globally
- Resolving EACCES permissions errors when installing packages globally
- Updating packages downloaded from the registry
- Using npm packages in your projects
- Using deprecated packages
- Uninstalling packages and dependencies
- Securing your code
Organizations allow teams of contributors to read, write, and public and private packages. Organizations are free when they publish public packages. When organizations publish private packages, an npm Teams subscription is required. For more information on NPM Teams pricing, see our products page.
- Creating and managing organizations
- Paying for your organization
- Managing organization members
- Managing teams
- Managing organization packages
Note: NPM Enterprise will be retired on June 30, 2021. For more information, please visit our FAQ about npm Enterprise plans.
Version 6.x (LTS release)