Description
Describe the bug
You cannot use the latest versions of mgt components with the latest SPFx.
To Reproduce
Steps to reproduce the behavior:
- Create a new SPFx web part (current SPFx is 1.20)
- Install the latest version of mgt packages (4.4.0) to the SPFx solution (
npm i @microsoft/mgt-components@4.4.0 @microsoft/mgt-element@4.4.0 @microsoft/mgt-react@4.4.0 @microsoft/mgt-sharepoint-provider@4.4.0 @microsoft/mgt-spfx-utils@4.4.0 -SE
) - Initialize the web part with some initial code. You can use code from the sample repository (component and web part). But you should scaffold a new web part from scratch, because the sample in the mentioned repo is a bit outdated (also
package-lock.json
installs older versions of packages, which we should avoid) and might not work as expected if you try to use it directly. - Run
gulp serve
and add web part to a page - you will see below error:
Which is actually
"Cannot find manifest for 32b9363b-09ff-4959-929a-cab2663fb223_3.0.7. Store had [3.0.2]. Service worker version: (none); App version: (unknown); Next app version: (unknown)"
Expected behavior
No errors, the web part renders mgt related components.
Additional information
The issue seems related to the fact, that SharePoint supports only 3.0.2 version of "@microsoft/microsoft-graph-client
.
SPFx packages normally depend on 3.0.2 version:
Mgt packages starting from version 4.3.0 have dependency on "@microsoft/microsoft-graph-client
of version 3.0.7 where the issues are. In contrast, the 4.2.5 version depends on 3.0.2 and works fine.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status