supabase
supabase copied to clipboard
Supabase crush edge functions on vercel: This Edge Function has crashed.
Version
- Operating System: Linux
- Node Version: v18.17.1
- Nuxt Version: 3.7.0
- CLI Version: 3.7.3
- Nitro Version: 2.6.2
- Package Manager: [email protected]
- Builder: -
- User Config: devtools, nitro, modules
- Runtime Modules: @nuxtjs/[email protected], @vueuse/[email protected], [email protected], [email protected], @nuxtjs/supabase: 1.0.2,
- Build Modules: -
Reproduction Link
Steps to reproduce
Add SUPABASE_URL and SUPABASE_KEY
- 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
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',
},