Skip to main content

Posts

Showing posts with the label ncu --upgrade

Upgrade to latest version of npm packages in a Javascript app like React

The need for a upgrade? Any library comes with upgrades to the functionality like security patches, functional improvement, performance tuned and new functionality added to accommodate the latest changes in the underlying language (in this case, it is Javascript) Also, these days there are lot of CVE (vulnerabilities) reported in many libraries so it is always good to upgrade and be on the latest version so as not to compromise the application. Also new functionalities / features brings in good chance for the dev team to learn and also write less and build more, so its a happy path always :) Steps to Upgrade 1. Install the npm-check-updates package through the below command  npm install -g npm-check-updates 2. Ensure that the package.json file is having a back-up or in source control like git, to be safe to make sure that we can revert back to the older one in case of troubleshooting any issues / incompatibilities in the new versions.  3. run the below command that scans the `package.j