What is the difference between `npm install` and `npm ci`?
BeginnerConceptBuild Tools and Artifact Repositories
Answer
npm install resolves versions using package.json and may update package-lock.json. npm ci requires an existing lockfile, deletes node_modules, and installs exactly what the lockfile says; it fails if package.json and the lockfile disagree. Use npm ci in CI for fast, deterministic, repeatable installs.
npm ci --prefer-offline --no-audit
More on Build Tools and Artifact Repositories
What is Maven and what is its build lifecycle?BeginnerWhat is the difference between `mvn package`, `install` and `deploy`?BeginnerHow do Maven dependency scopes and transitive dependencies work?IntermediateWhat is `settings.xml` in Maven and how do CI builds use it?IntermediateWhat is the Maven Wrapper and why use it?BeginnerHow do you cache dependencies and speed up Maven builds in CI?Intermediate