npm Cheat Sheet/Clean install from lockfile

Install exactly from package-lock.json for CI.

Section: Core npm CLI

Clean install from lockfile

bash
bash
npm ci
Explanation

Install exactly from package-lock.json for CI.

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 Core npm CLI
Show npm help
Open npm help.
OpenIn sheetbashsame section
Show npm version
Print the current npm version.
OpenIn sheetbashsame section
Initialize package.json
Run the interactive package initializer.
OpenIn sheetbashsame section
Initialize package.json with defaults
Create package.json using defaults.
OpenIn sheetbashsame section
Install dependencies from package-lock
Install project dependencies.
OpenIn sheetbashsame section
Run a package binary
Run a binary from local dependencies or a temp package.
OpenIn sheetbashsame section