supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Supabase crush edge functions on vercel: This Edge Function has crashed.

Open 1bye opened this issue 2 years ago • 1 comments

Version



Reproduction Link

Better it clone to vercel

Steps to reproduce

Add SUPABASE_URL and SUPABASE_KEY

  1. Reproduce it to vercel, with nuxt/supabase then without Links to vercel:
  • With error: https://flow-k7p3z33jf-1bye.vercel.app/ https://flow-n-1bye.vercel.app/
  • Without error: https://flow-gqy3ndxmd-1bye.vercel.app/

What is Expected?

Work with nitro preset vercel-edge

What is actually happening?

Crushing vercel edge functions

image

1bye avatar Sep 02 '23 20:09 1bye

Spent forever trying to solve this for vercel. I tried just using supabase-js as well as older versions. What finally fixed it for me is removing the vercel preset from the nitro options in the nuxt.config.js.

When you build it on vercel it still is picked up as the vercel preset. This leads me to believe it is an issue with Nitro. Do not set any preset as nitro will detect that it is vercel when deploying.

nitro: {
    // preset: 'vercel-edge',
  },

reidkolaczek avatar Sep 23 '23 18:09 reidkolaczek