sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPFx 1.18 + MGT 3 fails to run gulp bundle

Open Rafaelki opened this issue 1 year ago • 1 comments

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

  • [ ] 💥 Internet Explorer
  • [ ] 💥 Microsoft Edge
  • [ ] 💥 Google Chrome
  • [ ] 💥 FireFox
  • [ ] 💥 Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

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

Rafaelki avatar Feb 13 '24 15:02 Rafaelki

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

ghost avatar Feb 13 '24 15:02 ghost

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

priests123 avatar Jul 15 '24 14:07 priests123

@Rafaelki - is it still happening with SPFx 1.19?

AJIXuMuK avatar Aug 12 '24 14:08 AJIXuMuK

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.

Rafaelki avatar Aug 14 '24 12:08 Rafaelki