For Workers & Pages, what is the name of the domain?
dutchboxx.nl
What is the error message?
Failed to prepare server TypeError: Cannot read properties of undefined (reading ‘require’)
What is the issue or error you’re encountering
Sometimes when going to the domain, it shows a random “Server failed to respond” error in the body of the page.
What steps have you taken to resolve the issue?
Try and find everything in my code that contains ‘require’, changed this to import instead
It still shows:
{
"message": "Server failed to respond.",
"details": {}
}
What are the steps to reproduce the issue?
No idea.
I use Next.js 15.3.3 using turborepo
Screenshot of the error
Can someone help please? All my workers are breaking and I don’t have any clue what to do…
Same here, next 15.3.3 via @opennextjs/cloudflare 1.3.0,
Getting these errors all the time:
{
"message": "Server failed to respond.",
"details": {}
}
I think I managed to achieve 100% error rate on my main domain (previously it was 20-50%, every other time you refresh the page it did that).
Interestingly *.workers.dev url seems to work fine. Tried disabling Sentry, didn’t help.
Every request in logs ends with this:
2025-06-23 20:41:27:353
UTC
Failed to prepare server TypeError: Cannot read properties of undefined (reading 'require')
2025-06-23 20:41:27:353
UTC
NextJS request failed. TypeError: Cannot read properties of undefined (reading 'require')
2025-06-23 20:41:27:353
UTC
Failed to prepare server TypeError: Cannot read properties of undefined (reading 'require')
2025-06-23 20:41:27:353
UTC
NextJS request failed. TypeError: Cannot read properties of undefined (reading 'require'