Disallowed operation called within global scope
I'm getting this error:
Uncaught Error: Disallowed operation called within global scope. Asynchronous I/O (ex: fetch() or
connect()), setting a timeout, and generating random values are not allowed within global scope.
It's from file that I'm importing and can't change that. What to to in my wrangler settings to ignore it?1 Reply
Nothing. You need to somehow move that event into the fetch (or other) handler. It is not possible to do async IO in the global scope.