`Reflect.get called on non-object` error when using OpenAI library in NextJS
I'm having issues in getting OpenAI library to work in NextJS project on Cloudflare Pages.
I got the following error in workers log stream when calling the API endpoint on NextJS app:
Below is the minimal code that reproduce the issue:
I tried searching around on the internet to see if anyone encounter the same issues and possible solution but I couldn't found any. Interestingly, the example from Cloudflare Docs Stream OpenAI API Responses seems to be working when I tried it.
I got the following error in workers log stream when calling the API endpoint on NextJS app:
Below is the minimal code that reproduce the issue:
I tried searching around on the internet to see if anyone encounter the same issues and possible solution but I couldn't found any. Interestingly, the example from Cloudflare Docs Stream OpenAI API Responses seems to be working when I tried it.
Documentation for Cloudflare Workers, a serverless execution environment that allows you to create entirely new applications or augment existing ones …
