Skip to content

SPFx 1.22.x / 1.23 throws Cannot read properties of undefined (reading 'set') in debug mode when using Fluent UI React v9 components #10876

Description

@HarminderSethi

Target SharePoint environment

SharePoint Online

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

💥 SharePoint Framework

Developer environment

Windows

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

  • browser version 148.0.7778.217
  • SPFx version 1.22.x & 1.23
  • Node.js version 22.14.0
    -Fluent UI 9 - Tested with 9.56.6 - 9.66.6, 9.74.1

Describe the bug / error

When the web part is loaded from localhost, the following exception is thrown in the browser console:

TypeError: Cannot read properties of undefined (reading 'set')

Stack trace:

TypeError: Cannot read properties of undefined (reading 'set')
    at getModalizer (https://localhost:4321/dist/promotion-portal-web-part.js:96165:34)
    at initTabsterModules (https://localhost:4321/dist/promotion-portal-web-part.js:34449:58)
    at https://localhost:4321/dist/promotion-portal-web-part.js:34673:40
    at https://res-1.public.onecdn.static.microsoft/files/sp-client/sp-pages-assembly_en-us_*.js

The stack trace consistently points to Tabster initialization (getModalizer / initTabsterModules).

Steps to reproduce

  1. Create an SPFx web part using SPFx 1.22.2 or 1.23.
  2. Install Fluent UI React v9 (@fluentui/react-components).
  3. Use Fluent UI v9 controls within the web part.
  4. Run the solution using: npm run start
  5. Open the SharePoint page that hosts the web part.

Additional Information

  • Reproduced in SPFx 1.22.2 and 1.23.
  • Reproduced with multiple Fluent UI React v9 versions.
  • Only observed when running from localhost in debug mode.
  • The issue appears related to Tabster initialization which was previously working fine.

Expected behavior

Fluent UI React v9 components should work without throwing getModalizer / initTabsterModules errors, even when running in local debug mode

Metadata

Metadata

Assignees

Labels

area:fluent-uiCategory: Fluent UI / Office UI Fabric / Fabric Reactsharepoint-developer-supportsharepoint-developer-supporttype:bug-confirmedConfirmed bug, not working as designed / expected.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions