OpenNext on Worker giving back server errors
Hi all, I was running on Workers perfectly. Until today. I got sometimes this error:
{
"message": "Server failed to respond.",
"details": {}
}
This is returned in a JSON to the frontend. When refreshing, the page is working again. Is this a worker error? Or anything else going on?
I see this in the logs of the website the following thing:
NextJS request failed. TypeError: Cannot read properties of undefined (reading 'require')
Does anybody knows what I can do? I tried everything, like disable all caching. But can't figure out whats wrong
4 Replies
Seems like there is a module that uses require instead of import
ngl setting up OpenNext was hectic.
Hey, did you figure it out?
Hi @faye , thanks for asking .For now I decided to switch back to use of Vercel. Was not able to pinpoint the issue. The big inconsistency was that is was only happening sometimes, like 1 on 50 requests
yep.. and i have it with all my nextjs workers...