Issue with SSO Authentication Using OpenNext and Better-Auth
I have deployed a Next.js application using OpenNext and implemented SSO authentication with Better-Auth and Prisma. It works correctly in my local environment, but when I run the application with the "preview" and "deploy" commands, I encounter a 500 error on the request:
Enabling the Workers logs allowed me to see the error message, which is:
However, I am unable to determine where
Could someone advise on how to identify the package or code that is invoking
Enabling the Workers logs allowed me to see the error message, which is:
However, I am unable to determine where
fs.readdir is being used, as I do not directly use the fs package in my code. It appears that one of my dependencies is calling fs.readdir. Could someone advise on how to identify the package or code that is invoking
fs.readdir and provide any suggestions for working around or resolving this error?