Update package to a major release with NPM

Say you have “the-package” installed at version 3.x and want to upgrade to 5.x

You would do this:

npm install the-package@5

it will update package.json and package-lock.json as well.

You can also update multiple packages in one command like npm install package1@5 package2@16

To check which packages need updates, run npm outdated

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)