npm/pnpm/yarn
Packages Commands
List, update, and audit installed packages. Find outdated dependencies, check for security vulnerabilities, and manage package versions across your project.
12 commands
Pro Tips
Use 'npm outdated' to see which packages have newer versions available — shows current, wanted, and latest.
Use 'npm ls --depth=0' for a clean top-level view of installed packages without the full dependency tree.
Use 'npm explain pkg' to see why a package is installed and what depends on it.
Common Mistakes
Running 'npm update' respects semver ranges in package.json. Major version updates need 'npm install pkg@latest' explicitly.
Deleting node_modules and reinstalling fixes many issues but is slow. Try 'npm cache clean --force' first.