
How to read and write JSON Files with Node. References (and Big thanks):ĮTL: Load Data to Destination with Node.js

Important: Installing the latest version of a package puts the safeties provided by semantic versioning aside and can introduce major code changes into your project. This command will output the current installed versions of all packages, the wanted version ( npm update would want to update to this version), and the latest available version.įor example, we have the following package.json (created with npm init -y and version 4.8.1 of lodash installed): To check if any packages in your Node.js project are outdated, run npm outdated in the root folder (where the package.json file is). Update packages to a specific version or update packages to the latest major release.To update a dependency in a Node.js project you have to follow these steps: One of the best books in software development, sold over 200,000 times. The Pragmatic Programmer: journey to mastery.

On a regular basis these records need to be updated to pull the latest compatible version. The package-lock.json is locking/pinning a specific version of a package. Keeping dependencies up-to-date is important, to get the latest security fixes, performance improvements, and general bug fixes for the packages installed. This article is based on Node v16.15.1 and NPM 8.11.0.
