DEV Community

Cover image for How to update package.json dependencies
anitaparmar26
anitaparmar26

Posted on • Edited on

How to update package.json dependencies

If you've ever installed npm packages and you got same version (not upgrade packages). So not worry just three lines of code will help to update.

This npm-check-updates is a utility that automatically adjusts a package.json with the latest version of all dependencies.

$ npm i -g npm-check-updates
$ ncu -u
$ npm install
Enter fullscreen mode Exit fullscreen mode

1. $ npm i -g npm-check-updates
Update NPM Dependencies

2. $ ncu -u
Update NPM Dependencies

3. $ npm install
Update NPM Dependencies

Thank you for reading.

Top comments (0)