microsoft / ai-chat-protocol

A library + API spec for easily streaming generative AI output to your chat applications.
MIT License
115 stars 17 forks source link

Breaks Nuxt 3 with universal rendering #64

Open Mbeck89 opened 3 months ago

Mbeck89 commented 3 months ago

Breaks Nuxt 3 with universal rendering.

When ssr:false is set, the error does not appear.

500 Invalid URL

at splitURL (C:\Projekte\Nuxt_AIChat_Auth\node_modules\@microsoft\src\client.ts:71:18) at AIChatProtocolClient (C:\Projekte\Nuxt_AIChat_Auth\node_modules\@microsoft\src\client.ts:92:32) at setup (C:\Projekte\Nuxt_AIChat_Auth\pages\index.js:50:20) at _sfc_main.setup (C:\Projekte\Nuxt_AIChat_Auth\pages\index.js:287:23) at callWithErrorHandling (C:\Projekte\Nuxt_AIChat_Auth\node_modules\@vue\runtime-core\dist\runtime-core.cjs.js:196:19) at setupStatefulComponent (C:\Projekte\Nuxt_AIChat_Auth\node_modules\@vue\runtime-core\dist\runtime-core.cjs.js:7577:25) at setupComponent (C:\Projekte\Nuxt_AIChat_Auth\node_modules\@vue\runtime-core\dist\runtime-core.cjs.js:7538:36) at renderComponentVNode (C:\Projekte\Nuxt_AIChat_Auth\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:619:15) at renderVNode (C:\Projekte\Nuxt_AIChat_Auth\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:753:14)

glecaros commented 3 months ago

hi @Mbeck89, thank you for reaching out. Can you share any more details or even an min repro project?

Mbeck89 commented 3 months ago

Hi @glecaros Yes sure. As mentioned above you have to set ssr to false, or the app will break. https://github.com/Mbeck89/Nuxt_Chat_minimal