LinuxCommandLibrary

npm-ci

TLDR

Clean install from lockfile

$ npm ci
copy
Install production only
$ npm ci --production
copy
Install with legacy peer deps
$ npm ci --legacy-peer-deps
copy
Silent install
$ npm ci --silent
copy

SYNOPSIS

npm ci [options]

DESCRIPTION

npm ci installs from package-lock.json exactly. Designed for CI environments.
The command removes node_modules first. Faster and more deterministic than npm install.
npm ci is clean install.

PARAMETERS

--production

Skip devDependencies.
--legacy-peer-deps
Ignore peer dep conflicts.
--silent
Suppress output.
--help
Display help information.

CAVEATS

Requires package-lock.json. Deletes node_modules. Fails on lockfile mismatch.

HISTORY

npm ci was added to npm 5.7 for deterministic builds in continuous integration pipelines.

SEE ALSO

Copied to clipboard