How to Update a Node Dependency with NPM

Опубликовано: 27 Январь 2021
на канале: Hey Node
375
3

See the written version of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/how-upda...

It's important to keep your dependencies up-to-date in your package.json file. When relying on 3rd-party code you want to make sure you're pulling in security fixes, performance improvements, and general bug fixes. However, since your project's package-lock.json file pins a specific version of a package you'll occasionally need to update those records to pull in the latest compatible version, test it, and deploy it to your project.

In this tutorial we'll:

Use npm outdated to get a list of a project's dependencies that can be updated
Update an existing Node dependency to a new version
Update an existing Node dependency to a new major version

Heynode.com: The best online Node.js courses and tutorials to help you solve hard problems fast.