Update package.json to get latest packages in SharePoint Framework Solution

Hi Friends,

We are getting constantly updated packages from Microsoft and it's hard to determine what all packages have been published since you created you SharePoint Framework project. So to deal with this problem we can run the below commands and make this hectic task a much simple one.

https://www.sharepointwidgets.com


As we know until the package.json is updated it will not get the latest package no matter how many times you install the packages. So to updates the package.json in the SharePoint Framework solution you just need to run the following commands in your solution

npm install -g npm-check-updates : This will install the npm package globally. Installing it globally will allow the package to be used in all the solution without re-installing it

npm-check-update -u: Checks and updates all the packages in your package.json and updates them with the lates versions. Note this step only updates the package,json with the latest version of the packages referred in the solution

npm install: This will install all the latest packages in the solution.

So with just these three commands you do not worry if there are any latest packages that you need to install in your solution.

npm install -g: Will update the global installed packages with the latest version


Happy Coding
Sumit Kanchan




Comments

Popular posts from this blog

SharePoint Framework (SPFx) : Cascade dropdown in webpart properties

Checking user permission in SharePoint Framework (SPFx) webpart

SharePoint Image Gallery