npm - A JavaScript Package Manager
Introduction
npm is a versatile package manager specifically designed for JavaScript. It is widely used in the development community for managing dependencies and sharing reusable code. The npm CLI (command line interface) is an essential tool for developers, providing key functionalities to handle packages efficiently.
Requirements
To run npm, certain versions of Node.js need to be installed. It supports the following versions:
18.x.x
that are version18.17.0
or higher.- From version
20.5.0
onwards.
Installation
npm comes pre-installed with Node.js, making it easily accessible from most third-party distributions. For official downloads and additional distributions, users can visit nodejs.org/en/download.
Direct Download
Users looking to install npm directly can do so using the install.sh
script available on npmjs.com. Simply run the following command in your terminal:
curl -qL https://www.npmjs.com/install.sh | sh
Node Version Managers
For those who need to manage multiple versions of Node.js or npm, using a node version manager is recommended. These tools facilitate switching between different versions efficiently.
Usage
To use npm, simply enter the following command in your terminal, followed by the desired command:
npm <command>
Links & Resources
- Documentation: The official documentation provides comprehensive how-tos and guidance for using npm.
- Local documentation search is possible with:
npm help-search <query>
- Local documentation search is possible with:
- Bug Tracker: Here, users can search for existing issues or report new ones related to the CLI.
- Roadmap: Follow npm's development progress and future plans.
- Community Feedback and Discussions: Engage with others in discussions about the npm registry, website, and CLI.
- RFCs: A platform for contributing ideas and specifications concerning the npm CLI's API/design.
- Service Status: This page offers current status updates and incident reports for the npm website and registry.
- Project Status: An overview of all ongoing open-source projects maintained by npm.
- Events Calendar: Keep track of npm's open RFC calls, new releases, meetups, and conferences.
- Support: For issues related to the npm website or registry, users can file a support ticket.
Acknowledgments
By default, npm uses the npm Public Registry at https://registry.npmjs.org, subject to the terms outlined on npm's policy page. However, it also allows configuring other compatible registries. For more details on third-party registry configurations, refer to the documentation.
FAQ on Branding
Is it "npm" or "NPM" or "Npm"?
The correct representation is npm
. It should not be capitalized unless it appears in contexts that are typically all-capital, such as titles on man
pages.
Is "npm" an acronym for "Node Package Manager"?
Despite popular misconceptions, npm
is not an acronym for "Node Package Manager." It is a recursive bacronym representing "npm is not an acronym." The initial version of npm was derived from a bash utility called "pm", short for "pkgmakeinst", a utility that installed various packages on different platforms. If ever considered an acronym, it might informally stand for "node pm" or "new pm."