nuxt-modules / supabase

Supabase module for Nuxt.
https://supabase.nuxtjs.org
MIT License
677 stars 123 forks source link

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

Open 1bye opened 1 year ago

1bye commented 1 year ago

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:

What is Expected?

Work with nitro preset vercel-edge

What is actually happening?

Crushing vercel edge functions

image

reidkolaczek commented 12 months ago

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',
  },