Their is always a need to update the npm packages to latest version and keeping a tab on each version individually becomes difficult.

We have very good npm package available which can check for updates in one go and update the version’s in the package.json file.

npm-check-updates upgrades your package.json dependencies to the latest versions, ignoring specified versions.

Follow the below steps to quickly install the updates

Step 1: Open terminal

Step 2: Enter the command and hit enter key

npm install -g npm-check-updates


Step 3: Now check for updates, it will list all the outdated packages

ncu


Step 4: Update all the package versions in package.json file

ncu -u


Step 5: Now install the updated version package

npm install

You are done!!

One Thought to “How to update the npm packages in simple steps?”

  1. Shyan wasi

    This one is precise and clear😊

    Very helpful for the geeks who want to begin career in automation testing side.

    Hope to see complete video in future with detailed code and theory

Leave a Comment