Skip to content

Edge Function deploy failed due to an internal error

遇到 Function deploy failed due to an internal error 时,尝试通过 Supabase CLI 使用 --debug 标志部署该函数,以收集额外信息来识别可能的原因。

🌐 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:使用管理 API 来打包功能。
  • --use-docker:用 Docker 来打包函数。

如果你无法运行 CLI 或者无法确定原因,提交支持请求

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

示例错误

1
$ supabase functions deploy FUNCTION_NAME --project-ref $PROJECT_ID

带有 --debug 的示例输出

从这些细节可以看出,它已经超过了20MB的Edge 功能大小限制

🌐 From the details we can see it is exceeding the 20MB Edge Function size limit:

1
$ supabase functions deploy FUNCTION_NAME --project-ref $PROJECT_ID --debug
2
Deploying Function: FUNCTION_NAME (script size: 62.61MB)