How do you update npm packages to new versions?

Experience Level: Junior
Tags: npm

Answer

To update the npm packages open a command-line, go to your project folder that contains a file package.json and run the following command:

npm update

To update some module to the latest major version, use the following command:

npm install <package-name>@latest

Comments

No Comments Yet.
Be the first to tell us what you think.
npm for beginners
npm for beginners

Are you learning npm ? Try our test we designed to help you progress faster.

Test yourself