Edge Function deploy failed due to an internal error

Last edited: 12/18/2025

When encountering the Function deploy failed due to an internal error, try deploy the function via the Supabase CLI with the --debug flag to gather extra information to identify the possible cause.

You can also try alternative bundle methods:

  • --use-api: Use Management API to bundle functions.
  • --use-docker: Use Docker to bundle functions.

If you're not able to run the CLI or cannot identify the cause, open a support ticket.

Example error

1
$ supabase functions deploy FUNCTION_NAME --project-ref $PROJECT_ID
2
...
3
unexpected deploy status 500: {"message":"Function deploy failed due to an internal error"}

Example output with --debug

1
$ supabase functions deploy FUNCTION_NAME --project-ref $PROJECT_ID --debug
2
...
3
Deploying Function: FUNCTION_NAME (script size: 62.61MB)
4
...
5
unexpected update function status 413: {"message":"request entity too large"}