NextJS gives TypeError but only on cloudflare pages
I get "TypeError: Illegal invocation: function called with incorrect this reference. See https://developers.cloudflare.com/workers/observability/errors/#illegal-invocation-errors for details." but only when deployed. I do not get any errors on my localhost.
1 Reply
I have found that the issue is with the vercel version 3.1.2
I am trying to force to 3.1.1 but it won't work properly. I have added it to package.json and pnpm-lock but it still builds with vercel 3.1.2 cli. I am guessing that it is because of the build command pnpm dlx @Cloudflare/next-on-pages