npm install Explained

What npm install does, with an example.

Published November 10, 2026

npm install installs all dependencies listed in package.json, or adds a new one when given a package name.

Key points

  • Part of the standard npm CLI that ships with Node.js

Example

npm install lodash
More JavaScript articles