by Sai gowtham

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

Top Udemy Courses

JavaScript - The Complete Guide 2020 (Beginner + Advanced)
JavaScript - The Complete Guide 2020 (Beginner + Advanced)
26,545 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
221,520 students enrolled
44 hours of video content
View Course
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
114,575 students enrolled
21 hours of video content
View Course