npm (Node Package Manager)
Definition
The default package manager for Node.js that allows developers to install, share, and manage JavaScript libraries and their dependencies.
npm is the world's largest software registry and the default package manager for the Node.js JavaScript runtime. It provides a command-line interface (CLI) for installing packages and a web-based registry (npmjs.com) hosting over 2 million open-source packages.
The package.json file in a project's root defines its dependencies and metadata. Running npm install reads this file and downloads all required packages into the node_modules directory. Lock files (package-lock.json) ensure reproducible builds by recording exact dependency versions.
Key npm commands include npm install (add dependencies), npm run (execute scripts), npm publish (share packages), and npm audit (check for security vulnerabilities). Alternative package managers like Yarn and pnpm offer different approaches to dependency management with various performance and feature trade-offs.
Related Calculators
Related Terms
JSON (JavaScript Object Notation)
techA lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate.
API (Application Programming Interface)
techA set of rules and protocols that allows different software applications to communicate with each other and share data or functionality.
Git
techA distributed version control system that tracks changes in source code, enabling multiple developers to collaborate on projects simultaneously.
SDK (Software Development Kit)
techA collection of tools, libraries, documentation, and code samples that developers use to build applications for a specific platform or service.
Related Articles
JSON Formatting Best Practices: Write Clean, Valid JSON
Master JSON formatting with best practices for syntax, nesting, and validation. Learn common errors, debugging tips, and how to write clean JSON data.
Regex Cheat Sheet: Essential Patterns Every Developer Needs
A practical regex reference guide with common patterns for emails, URLs, phone numbers, and more. Includes syntax explanations and real-world examples.
How to Generate Secure Passwords: Best Practices for 2026
Learn how to create strong, secure passwords that protect your accounts. Covers password length, complexity, managers, and multi-factor authentication.
Guide to QR Codes: How They Work, Types & Best Uses
Learn how QR codes work, the different types available, and best practices for creating and using them in marketing, payments, and information sharing.