Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 900 Bytes

NPM Cheat Sheet.md

File metadata and controls

31 lines (21 loc) · 900 Bytes

NPM (Node Package Manager) Cheat sheet of mostly used commands

# Install all packages defined in package.json
        npm install 

# Install a particular package for the given project
        npm install package_name

# Install a particular package for all projects, in other words install package with global scope
        npm install package_name -g

# To Lists the installed versions of all dependencies in this software
        npm list

# Remove packages globally
        npm uninstall -g package-name        

# Show global packages    
        npm list -g

# List all npm configuration flags
        npm config ls -l

# Update the global npm version.
        npm update npm -g

# Locally edit a dependency
        npm edit <module_name>

# Test & Show the full dependency tree 
        npm install --dry-run