Interview Prep/CI/CD/Build Tools and Artifact Repositories

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
All CI/CD questions Roadmap: CI/CD fundamentals

More on Build Tools and Artifact Repositories