SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1k forks source link

SPFx 1.18 + MGT 3 fails to run gulp bundle #9516

Closed Rafaelki closed 1 month ago

Rafaelki commented 7 months ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

šŸ’„ SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

Additional environment details

SPFx version: 1.18

Describe the bug / error

The MGT team asked me to create an issue in this repo as SPFx fails to bundle when used with MGT v3. There is the initial issue in their repo: #2836

It seems that if we keep all the SPFx packages to "1.18.x" except "@microsoft/sp-build-web" that we set to "1.16.1", the bundle works without issues. So probably there is a problem with that library?

Steps to reproduce

Download the MGT samples and open the sp-webpart folder https://github.com/pnp/mgt-samples/tree/main/samples/app/sp-webpart Run pnpm install Run gulp bundle See error [17:30:17] ==================[ Finished ]================== Error - [webpack] Error processing webpack stats: TypeError: Cannot read properties of undefined (reading 'toJson') Error - [webpack] Webpack error: TypeError: Cannot set properties of undefined (setting 'asyncChunks')

Expected behavior

Gulp bundle should run without errors

ghost commented 7 months ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

priests123 commented 2 months ago

Is there any update on this issue? I'm currently experiencing the same behaviour

AJIXuMuK commented 1 month ago

@Rafaelki - is it still happening with SPFx 1.19?

Rafaelki commented 1 month ago

Hi @AJIXuMuK, I am unsure because we moved to MGT 4 where we didn't have this issue. Also, it is difficult to check anything in SPFx 1.19 due to #9834, which is a blocker for us to upgrade.

I think this issue can be closed.