Thanks for your comment. You are correct in your case. There are always up-/downsides to every approach.

Caching stuff leads to smaller build times, creating from scratch makes sure that everything is absolutely fine. So if you build everything from scratch without caching you will have no populated node_modules folder.

But please keep in mind that depending on how you define your dependency versions in your package.json it might happen that the 'npm install' command installs new dependencies than the one defined in package.lock.json. For this please see regarding different version ranges.

The 'npm ci' doesn't modify the package.lock.json


Pascal Zwikirsch

Solution Architect | Technical Writer | Passionate Developer