Node.js | npm - Node Package Manager

npm stands for Node Package Manager and provides various Node.js-related modules. With npm, installing, deleting, upgrading, and managing module dependencies becomes easier.

Introduction to npm

https://www.npmjs.com/

Installing npm

Install with Homebrew (macOS)

brew install npm

Installing an npm Module

$ npm install {module-name}

Removing an npm Module

$ npm uninstall {module-name}

Viewing the List of Globally Installed npm Modules

$ npm ls -g

This shows all installed items, including their dependencies, so the list becomes too long.

depth Option

$ npm ls -g --depth=0

If you specify the depth option like this, dependencies are omitted and only the installed item names are shown.