Go to https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/settings/functions and und
Go to https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/settings/functions and under the Compatibility flags section click configure and add
nodejs_compat. You'll probabaly need to redeploy your project

