Skip to content
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

SPFx 1.20.0 Upgrade: [object Object] Error Persists Despite applying the suggested fix #10035

Open
9 tasks
ejazhussain opened this issue Nov 30, 2024 · 0 comments
Open
9 tasks
Labels
type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@ejazhussain
Copy link

ejazhussain commented Nov 30, 2024

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

  • SPFx 1.20.0
  • Node.js version - 18.20.5

Describe the bug / error

Issue Summary

I upgraded my SPFx solution from 1.18.2 to 1.20.0. While the build and bundle processes completed successfully, I am still encountering the [object Object] error on the page.

Steps Taken

I followed the recommended guidelines but have not been able to resolve the issue.

Fix for [object|object] Issue

As part of the transition to Webpack 5 in SPFx 1.19, exception details were impacted, as noted in Issue #9834.

This issue is resolved by default for new projects created with the SPFx Yeoman generator 1.20. However, for existing projects, the following updates are required:

  1. Update SPFx tools packages to version 1.20.2.
  2. Upgrade @rushstack/eslint-config from 2.5.1 to 4.0.1.
  3. (Optional) Address new lint errors, such as @typescript-eslint/no-unsafe-function-type rule is not found, by modifying .eslintrc.js.
  4. (Optional) Resolve additional lint rule errors related to your codebase.

Screenshot

Error Screenshot

Steps to reproduce

  1. Upgrade the SPFx solution from 1.18.2 to 1.20.0
  2. Build
  3. Bundle
  4. Gulp serve and test the web part. You will get the following error
    Error Screenshot

Expected behavior

Upgrading the existing project to the latest SPFx version 1.20.0 should display the web parts

@ejazhussain ejazhussain added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

1 participant