Pages

Saturday, November 5, 2022

Type 'WebPartContext' is not assignable to type 'ISPFXContext' error in SPFX

Problem 

Getting an error when trying to create spfxContext in SPFx framework. At that time getting the below error. 

Type 'WebPartContext' is not assignable to type 'ISPFXContext'.
The types of 'msGraphClientFactory.getClient' are incompatible between these types.
Type '(version: "3") => Promise<MSGraphClientV3>' is not assignable to type '() => Promise<any>'





Solution

spfxContext: this.context as any



No comments:

Post a Comment