-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] : 3.0.0-preview.1 : Unable to use mgt-react components in SPFx #2158
Comments
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 |
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 |
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. This is really unfortunate that SharePoint is not able to serve a lower patch version. |
@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:
![image](https://user-images.githubusercontent.com/9694225/228800145-65367c8e-810f-48d6-92ce-4dd7c8e9b8d8.png)
Logs from console:
![image](https://user-images.githubusercontent.com/9694225/228800341-444a6bfd-35d7-4e5e-877f-3d02801730df.png)
Another type of error that is seen sometimes on web part load:
![image](https://user-images.githubusercontent.com/9694225/228800952-b436c4e7-ddf9-46cc-812d-749d992f3a98.png)
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.The text was updated successfully, but these errors were encountered: