Skip to content
On this page

NodeJS

NodeJS

Installation

bash
brew install node

Useful commands

Install package

bash
# Install locally
npm install <package>

# Install globally
npm install -g <package>

# Save package dependency to `package.json`
npm install <package> --save

Update package

bash
# Upgrade all or specific package
npm update [-g] [<package>]

Uninstall package

bash
npm uninstall [-g] <package>

List installed packages

bash
npm list [-g] [--depth=0]

List of outdated packages

bash
npm outdated [-g]