SharePoint / SharePoint/sp-dev-docs

SPFx webpart can't be loaded: Cannot read properties of undefined (reading 'id')

Open
#10,649 4 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Feb 16, 2026.

area:spfx Needs: Author Feedback sharepoint-developer-support type:bug-suspected
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

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
  • browser version: Edge 144.0.3719.115
  • SPFx version: 1.22.2
  • Node.js version: 22.22.0
Describe the bug / error

I am migrating a SPFx solution from 1.9.1 to SPFx 1.22.2. All steps of the migration process were completely sucessfully and all SCSS, TypeScript an eslint errors were solved and the solution is building sucessfully.

However, I am getting this error after deploying the web part to the Site Collection App Catalog:

Could not load my-web-part in require. TypeError: Cannot read properties of undefined (reading 'id')
at sp-pages-assembly_en-us_90032a83f8eaa3f8b6d063951bd8f3bb.js:227:12727
at new Promise ()
at e.loadComponent (sp-pages-assembly_en-us_90032a83f8eaa3f8b6d063951bd8f3bb.js:227:12695)
at sp-pages-assembly_en-us_90032a83f8eaa3f8b6d063951bd8f3bb.js:227:6401
at async Promise.all (/sites/QAS/SitePages/index 0)

I have been searching the web and talking to Copilot but after almost one day of researching and troubleshooting, I was unable to successfully make SharePoint to load the web part.

Can anyone help me to solve this error?

Thanks

Steps to reproduce
  1. heft clean && heft test --production && heft package-solution --production
  2. Upload the new version to the Site Collection App Catalog
  3. Test the page where the web part is included
Expected behavior

The web part to work properly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.