DevOps CI/CD class starts:
Get a $50.00 OFF, if you enroll now.
Less famous than its sibling,
npm install, with
npm clean-install (
npm ci for short), your CI/CD process becomes more robust. Here’s how to use it.
What Is npm?
The typical install invocation is:
$ npm install -s MODULE_NAME
This does a number of things:
- Searches for the module by name.
- Downloads and installs the module and its dependencies.
- Updates (or creates) package-lock.json. This file is called the lockfile, and it lists the URL and checksum of every module installed.
- Adds the module name and version to package.json. This file is known as the manifest.
The key to reproducibility lies in the lockfile,
package-lock.json. The next time we run
npm install, the package manager will compare it with the…