NPM Package Manager
Complete guide to NPM including package.json configuration, dependency management, CLI commands, publishing, and workspaces
Table of Contents
Project Setup & Initialization
Initialize and configure new NPM projects
Initialize Project
Create a new package.json file
Package.json Structure
Essential fields in package.json
NPX - Package Execution
Execute packages without installing globally
Package Management
Install, update, and remove packages
Installing Packages
Add dependencies to your project
Updating Packages
Keep dependencies up to date
Removing Packages
Uninstall and clean up packages
Scripts & Task Running
Define and run npm scripts
Running Scripts
Execute scripts defined in package.json
Environment & Config
Configure NPM behavior and environment
Publishing & Versioning
Publish packages and manage versions
Version Management
Semantic versioning and releases
Publishing Packages
Publish to NPM registry
Security & Maintenance
Keep projects secure and well-maintained
Security Auditing
Find and fix security vulnerabilities
Package Information
Inspect and analyze packages
Workspaces & Advanced
Monorepo management with NPM workspaces
NPM Workspaces
Manage multiple packages in monorepo
NPM Link & Local Dev
Link local packages for development
Cache & Performance
Manage NPM cache and improve performance