Aríadust
CDCloudflare Developers
•Created by Aríadust on 9/21/2023 in #pages-help
`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.
6 replies