npm

JavaScript and Node.js package manager. Manage Node.js projects and their module dependencies. More information: <https://www.npmjs.com>.

Install

All systems
curl cmd.cat/npm.sh
Debian Debian
apt-get install npm
Ubuntu
apt-get install npm
Alpine
apk add npm
Arch Arch Linux
pacman -S npm
image/svg+xml Kali Linux
apt-get install npm
Fedora
dnf install npm-1
Windows (WSL2)
sudo apt-get update sudo apt-get install npm
Raspbian
apt-get install npm
Docker
docker run cmd.cat/npm npm powered by Commando

JavaScript and Node.js package manager. Manage Node.js projects and their module dependencies. More information: <https://www.npmjs.com>.

  • Interactively create a `package.json` file:
    npm init
  • Download all the packages listed as dependencies in package.json:
    npm install
  • Download a specific version of a package and add it to the list of dependencies in `package.json`:
    npm install [email protected]
  • Download a package and add it to the list of dev dependencies in `package.json`:
    npm install module_name --save-dev
  • Download a package and install it globally:
    npm install --global module_name
  • Uninstall a package and remove it from the list of dependencies in `package.json`:
    npm uninstall module_name
  • Print a tree of locally installed dependencies:
    npm list
  • List top-level globally installed modules:
    npm list --global --depth=0

© tl;dr; authors and contributors