How do you update npm packages to new versions?

Experience Level: Junior
Tags: npm


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
Related npm job interview questions
npm for beginners
npm for beginners

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

Test yourself