Loading...
npm install
npm run buildnpm ci
npm run buildnpm ci installs exactly what the lock file lists and fails if it is out of sync, so CI builds match local ones.
npm ci fails because the lock file was not updated after editing package.json.npm ci, not npm install.package-lock.json is committed and in sync with package.json.node_modules, since npm ci deletes node_modules first.It always starts clean so the result depends only on the lock file, not on leftovers from earlier installs.
Yes. npm ci --omit=dev installs only production dependencies, which is common in Docker images.
No. It needs package-lock.json or npm-shrinkwrap.json and stops with an error otherwise.