Closed anoopt closed 1 year ago
Hello anoopt, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
You would not need mgt-spfx
per my understanding. Do you get the same results without the library component package?
Thanks Seb. Yes. I tried without (and with) the library component. I see the same error.
There are issues currently with SPFx and MGT in v3. The mgt-spfx-utils
has issues with the package and this makes it fail. We are looking into it and will fix for our next preview drop!
Thank you for the update @sebastienlevert
I think that the underlying culprit here is that SharePoint is treating the @microsoft/microsoft-graph-client as a library component. The latest version of the graph client library is 3.0.5 while the SharePoint infrastructure has 3.0.2 as the highest available version.
This is really unfortunate that SharePoint is not able to serve a lower patch version. Our best bet here is to pin all of our libraries to use 3.0.2 explicitly rather than the ^3.0.0 server range we currently use.
@anoopt this is fixed in v3.0.0-preview.2 which was released today :)
Brilliant all ok now :)
Describe the bug With v3.0.0-preview.1 of mgt-react, when an mgt-react component is used in an SFPx web part, we get an error saying - Script error for: @microsoft/microsoft-graph-client http://requirejs.org/docs/errors.html#scripterror
To Reproduce Steps to reproduce the behavior:
@microsoft/mgt-spfx
and@microsoft/mgt-react
packages - version 3.0.0-preview.1Code added in the component
Expected behavior The mgt-react component should load in the web part.
Screenshots
On web part load:
Logs from console:
Another type of error that is seen sometimes on web part load:
Environment (please complete the following information):
Additional context Tried the same by deploying
@microsoft/mgt-spfx
SharePoint Framework package to the tenant and still get the same error.