Introduction
A few days ago, I wanted to add a few new functionalities in my existing project but when I executed the project, there arrived so many errors and I got an idea that it was all about package versioning issues.
So, I thought to update all my packages at once and quick start my pending tasks. I found a few ways to update all the packages listed in the package.json file.
Updating any npm package is a very straightforward task, and you can do it by just writing a few commands, so in this post, I am going to share the way you can use it to update all the packages in package.json file into our Angular application.
How to check outdated packages in our project
Sometimes we want to know about how many packages in our project are outdated and needs to be updated with latest version, the solution is to use the below npm command.
- npm outdated
Ways to update npm packages
For updating any package there are two ways :
- Using npm update
- Using npm-check-update package
Using npm update
Using this option is pretty straight-forward , you just need to write the command and all the packages will be updated within a minute based on your number of packages and internet speed, just write command and your package will be updated.
- npm update
Update using npm-update-ckeck package
This is a package available at npmjs.org , named npm-update-check, which works the same as npm update command.
But the difference is that it's a utility that automatically adjusts packages which are listed into package.json file , whenever any updates are required. For that we need to install it via command:
- npm install -g npm-check-updates
- ncu -u // tells to update via npm package
Conclusion
So this is how you can update your packages within a short period of time. I hope it will help you some day. Thanks for reading.

Chittaranjan SwainPosted Nov 27, 2019, 9:22 PM
Nice work.
Sanjit Kumar SinghPosted May 6, 2018, 3:34 AM
Awesome and most required blog
Reena LakraPosted May 4, 2018, 8:09 AM
Very informative article, thanks for sharing.
Komal SharmaPosted May 3, 2018, 8:45 AM
Nice article Manav Sir.........
Naresh SinghalPosted May 3, 2018, 12:37 AM
Fantastic Bro Manav Pandya , keep it up....
Mohan ArumugamPosted May 2, 2018, 11:26 PM
Nice article, thanks for sharing it with us
Mahesh VermaPosted May 2, 2018, 10:34 AM
Nice article, a ton of thanks to share such kind of information.
Bhavesh JadavPosted May 2, 2018, 10:32 AM
Great thinking to solve problems and share it to other, thanks for sharing it.