You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
7:34:19 PM [vite] Error when evaluating SSR module /main.server.mjs:
2024-06-12T19:34:19.534881356Z |- TypeError: Cannot convert undefined or null to object
2024-06-12T19:34:19.534883506Z at Function.getPrototypeOf (<anonymous>)
2024-06-12T19:34:19.534885641Z at eval (/usr/src/app/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js:538:43)
2024-06-12T19:34:19.534887281Z at eval (/usr/src/app/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js:9:68)
2024-06-12T19:34:19.534888777Z at node_modules/web-streams-polyfill/dist/ponyfill.es2018.js (/usr/src/app/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js:12:1)
2024-06-12T19:34:19.534890467Z at __require2 (/usr/src/app/.angular/vite-root/chatsite/chunk-QU2RNZFD.mjs:51:50)
2024-06-12T19:34:19.534891964Z at eval (/usr/src/app/node_modules/openai/_shims/node-runtime.mjs:9:32)
2024-06-12T19:34:19.534893442Z at async instantiateModule (file:///usr/src/app/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:55058:9)
2024-06-12T19:34:19.534894944Z
Now I'm unsure whether or not this is something you guys can fix, or it should be somehow reported to Angular or the polyfill... but I thought I'd start here, because I really have no clue what's going on. The internals of the AssistantStream are somewhat beyond me and I have no experience with handling streams in Typescript.
Feel free to close this issue and report it to the right place - or I can do it with the right info.
To Reproduce
Install Angular normally with
npm install -g @angular/cli
ng new my-app
As part of the installation prompts, choose to use SSR
Add this lib
npm install openai
Change the app.component.ts to include the openai AssistantStream
Hi, sorry we haven't been able to get to the bottom of this yet.
The repro steps you've provided look helpful, so I hope we'll be able to fix this at some point, but candidly I'm not confident we'll be able to get to it soon.
Can you let me know if the same problem happens with ChatCompletionStream?
(A PR from the community would be welcome here FWIW, but I do expect it to be quite tricky)
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
Just by adding the following lines in my new Angular project, I get an error.
Lines:
On compiling the code I get the following error:
Now I'm unsure whether or not this is something you guys can fix, or it should be somehow reported to Angular or the polyfill... but I thought I'd start here, because I really have no clue what's going on. The internals of the AssistantStream are somewhat beyond me and I have no experience with handling streams in Typescript.
Feel free to close this issue and report it to the right place - or I can do it with the right info.
To Reproduce
As part of the installation prompts, choose to use SSR
Code snippets
x
OS
Linux Mint
Node version
20.9.0 and 22.1.0
Library version
4.51.0
The text was updated successfully, but these errors were encountered: