npm Install & Dependencies/Install a package

Install a runtime dependency.

Section: Installing dependencies

Install a package

bash
bash
npm install <package>
Explanation

Install a runtime dependency.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Installing dependencies
Install a specific version
Install an exact version.
OpenIn sheetbashsame section
Install a dev dependency
Add a development dependency.
OpenIn sheetbashsame section
Install an optional dependency
Add an optional dependency.
OpenIn sheetbashsame section
Install as peer dependency
Add a peer dependency entry.
OpenIn sheetbashsame section
Install without saving
Install a package without editing package.json.
OpenIn sheetbashsame section
Install globally
Install a CLI tool globally.
OpenIn sheetbashsame section