# Installing Packages — Node.js Fundamentals: Modules, Async and Servers

Source: https://www.skillbyai.com/en/nodejs/node-npm-install

> Install runtime and dev dependencies with npm, and commit package-lock.json for reproducible installs.

## npm install

Add a runtime dependency, a dev-only tool, or install everything from an existing `package.json`.

```bash
npm install express          # runtime dependency
npm install -D nodemon       # devDependency
npm install                  # install everything from package.json
```

## node_modules & the lockfile

Packages land in `node_modules/`. `package-lock.json` pins exact versions so every install is reproducible — commit it.
