Register to Better Coder! It's free.
Enjoy the premium features and succeed at every job interview.
How do you update npm packages to new versions?
Experience Level: Junior
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:
To update some module to the latest major version, use the following command:
npm install <package-name>@latest
Related npm job interview questions
Should you store node_modules directory to a version control?npm Junior
How do you install npm?npm Junior
Using npm, how can you install multiple modules at once locally?npm Junior
Using npm, how can you display a list of all installed global packages?npm Junior
What does npm audit fix command do and when would you use it?npm Junior