npm

JavaScript and Node.js package manager. Manage Node.js projects and their module dependencies. Homepage: <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
Raspbian
apt-get install npm

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

  • Download and install a module globally:
    npm install -g module_name
  • Download all dependencies referenced in package.json:
    npm install
  • Download a given dependency required for the application to run, and add it to the package.json:
    npm install [email protected] --save
  • Download a given dependency for development purposes, and add it to the package.json:
    npm install [email protected] --save-dev
  • Uninstall a module:
    npm uninstall module_name
  • List a tree of installed modules referenced in package.json:
    npm list
  • List top-level globally installed modules:
    npm list -g --depth=0
  • Interactively create a package.json file:
    npm init

© tl;dr; authors and contributors