List of useful commands for npm

At dotmaui.com we use a lot Node.js and therefore npm for package management.
We keep a list of the commands we use most often and today we want to share it with you.

List npm user-installed packages:

npm list -g --depth=0

Check for outdated npm packages:

npm outdated

Version of an npm package:

npm view sax version

Install specific version of a module:

npm install sax

or

npm install sax@latest

or

npm install sax@1.0.1

Remove package:

npm uninstall sax


Update package:

npm update sax

or

npm install sax@latest

Leave a Comment

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