Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Node

Upgrade npm

npm install npm@latest -g

View versions of a package

npm view package-name versions

Global Packages

Find all globally installed packages

npm ls -g --depth 0

Install/update a package globally

npm install http-server -g

Find outdated global packages

npm outdated -g --depth=0

Auditing

Find any production packages with vulnerabilities. Id est, ignore any development packages.

npm audit --production

Determine why a package is required.

npm explain package-name
npm why package-name
npm ls package-name