Node.js npm cheatsheet

List all global npm packages and any dependencies

npm list -g

Filter npm list results

npm list -g | grep grunt

Don’t show dependancies in list

npm list -g --depth=0

Show the latest version of a package on npm

npm view grunt-cli version

List outdated local packages

npm -g outdated

Show current version of a local npm package

npm show grunt-cli version

Update an npm package to the latest available version

npm update -g grunt-cli
This entry was posted in JavaScript, Node JS on by Peter J Langley.

Leave a Reply

Your email address will not be published. Required fields are marked *