How to update a specific node package using Npm
In this tutorial, we will learn how to update a specific node package instead of updating all packages present in package.json
file using npm.
Updating specific package
To update a specific package, we need to run the npm update
command followed by the package name.
npm update react
Sometimes, you want to update a package to the specific version in such cases you need to use npm install
command by specifying a version number after the package name.
npm install react@15
Here 15
is the package version.
Similarly, you can also download the latest stable version by specifying a @latest
flag.
npm install react@latest