mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
51 lines
1.9 KiB
Plaintext
51 lines
1.9 KiB
Plaintext
---
|
|
title = "Unable to deploy Edge Function"
|
|
topics = [ "functions" ]
|
|
keywords = [ "deploy", "deployment", "edge function", "deno", "syntax", "bundle" ]
|
|
database_id = "68bb6df6-6a07-40fa-ad4d-dfa5e21d7e9c"
|
|
|
|
[api]
|
|
cli = [ "supabase-functions-deploy" ]
|
|
---
|
|
|
|
If you're having trouble deploying an Edge Function, follow these steps to diagnose and resolve the issue.
|
|
|
|
## Diagnose the issue
|
|
|
|
1. **Check function syntax:** Run `deno check` on your function files locally
|
|
2. **Review dependencies:** Verify all imports are accessible and compatible with Deno
|
|
3. **Examine bundle size:** Large functions may fail to deploy
|
|
|
|
```bash
|
|
# Check for syntax errors
|
|
deno check ./supabase/functions/your-function/index.ts
|
|
|
|
# Deploy with verbose output
|
|
supabase functions deploy your-function --debug
|
|
```
|
|
|
|
## Common causes
|
|
|
|
- **Syntax errors:** TypeScript or JavaScript syntax issues in your function code
|
|
- **Invalid imports:** Importing modules that don't exist or aren't compatible with Deno
|
|
- **Large bundle size:** Functions have a maximum size of 20MB when bundled locally through the CLI, or 5MB when bundled server-side, for example through the Management API or Dashboard. See [Bundle size issues](./edge-function-bundle-size-issues) for more details
|
|
- **Network issues:** Problems reaching the Supabase API during deployment
|
|
|
|
## Before opening a support ticket
|
|
|
|
Make sure you're using the latest version of the Supabase CLI:
|
|
|
|
```bash
|
|
supabase --version
|
|
```
|
|
|
|
If it's out of date, upgrade using whichever package manager installed the CLI, for example `brew upgrade supabase`, `npm update supabase --save-dev`, or `scoop update supabase`.
|
|
|
|
If these steps don't resolve the issue, open a support ticket via the Supabase Dashboard and include all output from the diagnostic commands.
|
|
|
|
## Additional resources
|
|
|
|
- [Edge Functions guide](/docs/guides/functions)
|
|
- [Bundle size issues](./edge-function-bundle-size-issues)
|
|
- [Edge Function limits](/docs/guides/functions/limits)
|