How To Upgrade SPFx Version Using O365 CLI

Ahamed Fazil Buhari
 
Senior Developer
May 26, 2020
 
Rate this article
 
Views
887

Keeping our solution up-to-date is one of the key thing to get all the new features, improvements and bug fixes that were happened for that release. SPFx is evolving in each release and we can see that the solutions that’s developed few months back has already outdated with new release. By the time I write this article, the SPFx has latest version of 1.10,

spfxv

Still we can manually upgrade SPFx to any version we need by updating few package versions in package.json file and update runtime compiler and so on, well for that we should keep your eyes wide opened so that we won’t mess up with other packages and versions.

Well, this article is all about how easily and quickly we can upgrade SPFx solution. For that I used Office 365 CLI which is great tool for managing your Microsoft Office 365 tenant and SPFx solutions (and it works on any platform). In the below example I am gonna upgrade my SPFx from 1.8 to 1.10. The below solutions is an Application Customizer, so you may notice some package different compare to SPFx WebPart but that doesn’t matter for this article. All it matters is how to upgrade from 1.8 to 1.10

This is what I have in my package.json before upgrade. With the help of spfx project upgrade command we can easily upgrade the version,

ver

We can see list of things that needs to be updated after we ran the command spfx project upgrade –toVersion 1.10.0 now we clearly know what file and what package should get updated. After making changes by following the output that we received from spfx project upgrade command. My application customizer has been successfully upgraded to version 1.10.

ver10

Happy Coding

Fazil

Category : Node, Office 365, SPFx

Author Info

Ahamed Fazil Buhari
 
Senior Developer
 
Rate this article
 
Ahamed is a Senior Developer and he has very good experience in the field of Microsoft Technologies, especially SharePoint, Azure, M365, SPFx, .NET and client side scripting - JavaScript, TypeScript, ...read more
 

Leave a comment