Get help

npm help

// Get help on specific command
npm install -h

View latest version of npm

npm -v

Install a package

npm install PACKAGENAME

// Install globally, might need global permissions
npm install PACKAGENAME -g

// Install as a dependency, adds to package.json
npm install PACKAGENAME --save

// Install packages defined in package.json
npm install

Uninstall a package

npm uninstall PACKAGENAME

// Removes from package.json too
npm uninstall PACKAGENAME --save

// Remove globally
npm uninstall PACKAGENAME -g

Gives overview of package versions

npm outdated

Update packages, if no package.json file is present it will update all packages in node_modules folder to the latest version. This doesn’t seem to update the package.json file, however I found a package that does the job npm-check-updates.

npm update

FAQ

npm faq

Worthy of Note

Worthy of Note is a site aimed at Web Designers & Developers. It offers a wide range of resources to help assist anyone in the web industry.

View