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

react-azure-openai-api-stream - #5128

Closed
9 tasks
raphking2 opened this issue Apr 20, 2024 · 2 comments
Closed
9 tasks

react-azure-openai-api-stream - #5128

raphking2 opened this issue Apr 20, 2024 · 2 comments

Comments

@raphking2
Copy link

Disclaimer

Yes

Sample

react-azure-openai-api-stream

Contributor(s)

@luismanez @thechriskent

What happened?

Hi , please i this webpart works if i am running it on local workbench like running the command gulp serve and then try it on workbench it works but if i bundle and package the solution, it throws error and does work after being uploaded in app catalogue it says something went wrong if i add the webpart to a site.
**Something went wrong
If the problem persists, contact the site administrator and give them the information in Technical Details.
TECHNICAL DETAILS
ERROR:
Cannot read properties of undefined (reading 'id')

CALL STACK:
TypeError: Cannot read properties of undefined (reading 'id')
at https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_0e5b786098148c2556f5398c123087e9.js:192:10989
at new Promise ()
at e.loadComponent (https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_0e5b786098148c2556f5398c123087e9.js:192:10957)
at https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_0e5b786098148c2556f5398c123087e9.js:192:13165
at async Promise.all (index 0)**

Steps to reproduce

1.npm install
2.gulp bundle --ship
3.gulp package-solution --ship

Expected behavior

Something went wrong
If the problem persists, contact the site administrator and give them the information in Technical Details.
TECHNICAL DETAILS
ERROR:
Cannot read properties of undefined (reading 'id')

CALL STACK:
TypeError: Cannot read properties of undefined (reading 'id')
at https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_0e5b786098148c2556f5398c123087e9.js:192:10989
at new Promise ()
at e.loadComponent (https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_0e5b786098148c2556f5398c123087e9.js:192:10957)
at https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_0e5b786098148c2556f5398c123087e9.js:192:13165
at async Promise.all (index 0)

Target SharePoint environment

SharePoint Online

Developer environment

None

Browsers

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

What version of Node.js is currently installed on your workstation?

v16.20.2

What version of Node.js is required by the sample?

v16

Paste the results of SPFx doctor

n/a

Additional environment details

No response

@raphking2 raphking2 added the type:bug-suspected Suspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs label Apr 20, 2024
@luismanez
Copy link
Contributor

can't help much, as I cannot reproduce it. However, per my experience, these kind of issues are almost always related with versions of NodeJS, or SPFx libraries. My Node version when developed the sample was 16.18.1. You can also try to stack to the exact version of the npm packages removing the caret symbol, for example:

    "@microsoft/fetch-event-source": "2.0.1",
    "@microsoft/mgt-react": "3.0.1",

Pretty sure is a versioning thing...

@hugoabernier hugoabernier added status:spfx-doctor and removed type:bug-suspected Suspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs labels Apr 24, 2024
Copy link

No SPFx Doctor information

Thank you for reaching out! Unfortunately, we cannot proceed further without information from SPFx doctor to diagnose potential dependency issues with your enviroment and/or project.

Follow the steps listed in troubleshooting issues with samples

Feel free to open a new issue with the full SPFx doctor results. Make sure to provide all the requested information so that we can help you as quickly as possible.

We appreciate your understanding and cooperation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants