Next.js 15.2.3 Update Broke My Page: "Disallowed Operation Called Within Global Scope" Error

After updating Next.js from 15.1.4 to 15.2.3, my page stopped working, and I’m running into this error:
Error: Disallowed operation called within global scope. Asynchronous I/O (e.g., fetch() or connect()), setting a timeout, and generating random values are not allowed within global scope. To fix this error, perform this operation within a handler.
I’ve already updated the compatibility date, but after spending a few hours searching, I still can’t figure out what’s causing this. Any ideas or suggestions? I’d really appreciate the help! 😄
2 Replies
Alex Oliveira
Alex Oliveira2w ago
I have the same problem! Did you manage to solve it?
rocka.gg
rocka.ggOP4d ago
Nope, I’m going to wait for an update to next-on-pages in npm, but for now, I’m using @opennextjs/cloudflare in workers.

Did you find this page helpful?