DEV Community

Cover image for How To Speed Up Continuous Integration Build With New NPM CI And package-lock.json
Tomas Trajan 🇨🇭
Tomas Trajan 🇨🇭

Posted on • Originally published at Medium

How To Speed Up Continuous Integration Build With New NPM CI And package-lock.json

While very controversial, the recent npm release 5.7.0 brought some amazing features which will have noticeable positive impact on your development workflow!

The new npm ci command installs from your lock-file ONLY. If your package.json and your lock-file are out of sync then it will report an error.It works by throwing away your node_modules and recreating it from scratch. Beyond guaranteeing you that you’ll only get what is in your lock-file it’s also much faster (2x-10x!) than npm install

Generate and use package-lock.json file

I have hard time guessing what ratio of developer is using package-lock.json already. It wasn’t behaving intuitively when first introduced and I suppose many people kept on deleting the file to prevent unnecessary headache.

Read more...

Top comments (0)