DEV Community 👩‍💻👨‍💻

Alireza Razinejad
Alireza Razinejad

Posted on

How to use package-lock.json

What is package-lock.json usage after all?? 😒

The answer is simple!

We want all developers to develop code with the same package versions!
Another use case is we want exactly the same package versions to be installed in the pipeline of course!!

But why when run npm i it will update package-lock.json and sometimes it will update package.json?? 😮

This is its job!!!
It will make sure the latest stable package be installed!

So how do we make use of package-lock.json? 🙄
It's simple!
We need a clean install! 😎

But how? 😐
with npm ci 🤗

Top comments (0)

Top Heroku Alternatives (For Free)

>> Check out this classic DEV post <<