How to update the npm packages in simple steps?

0

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

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

How to update the npm packages in simple steps

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

We have a 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

npx npm-check-updates


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

npx npm-check-updates -u


Step 5: Now install the updated version package

npm install

You are done!!

Leave a Reply

Your email address will not be published. Required fields are marked *