Related to the original response, npm 6 now allows you to run npm ci
Which deletes the node_modules and installs the exact version mentioned in your lock file. This is a great way to reproduce the exact working copy of your node app.
Yeah! It mostly is, but the subtle difference was our package-lock.json files were out of sync. We were just having a hard time getting everyone on the same version of npm, so the package-lock.json files generated by npm install were slightly different. npm ci runs based off of package-lock.json
It sounds like that's the problem
npm ci
tries to solveRelated to the original response, npm 6 now allows you to run
npm ci
Which deletes the node_modules and installs the exact version mentioned in your lock file. This is a great way to reproduce the exact working copy of your node app.
Yeah! It mostly is, but the subtle difference was our package-lock.json files were out of sync. We were just having a hard time getting everyone on the same version of npm, so the
package-lock.json
files generated bynpm install
were slightly different.npm ci
runs based off ofpackage-lock.json
Now I see what you means.
While
npm ci
tries to make library to be consistent across computers,relock
command installs libraries from clean slate.