Unknown internal error occurred while publishing function

|2024-06-04T12:43:26.512996Z|Cloning repository...|
|---|---|
|2024-06-04T12:43:27.468645Z|From https://github.com/LaRaILU/AlemDasPrateleiras|
|2024-06-04T12:43:27.46913Z| * branch            f7e8d341decbd6cc55bb04c5a8bbd1f3081cf386 -> FETCH_HEAD|
|2024-06-04T12:43:27.469231Z||
|2024-06-04T12:43:27.503365Z|HEAD is now at f7e8d34 Rename db to booksdb|
|2024-06-04T12:43:27.503772Z||
|2024-06-04T12:43:27.589853Z||
|2024-06-04T12:43:27.590335Z|Using v2 root directory strategy|
|2024-06-04T12:43:27.613634Z|Success: Finished cloning repository files|
|2024-06-04T12:43:29.226692Z|Checking for configuration in a wrangler.toml configuration file (BETA)|
|2024-06-04T12:43:29.227294Z||
|2024-06-04T12:43:29.227399Z|Found wrangler.toml file. Reading build configuration...|
|2024-06-04T12:43:29.232586Z|pages_build_output_dir: |
|2024-06-04T12:43:29.232797Z|Build environment variables: (none found)|
|2024-06-04T12:43:29.331153Z|Successfully read wrangler.toml file.|
|2024-06-04T12:43:29.409084Z|No build command specified. Skipping build step.|
|2024-06-04T12:43:29.410097Z|Found Functions directory at /functions. Uploading.|
|2024-06-04T12:43:30.329936Z|✨ Compiled Worker successfully|
|2024-06-04T12:43:30.362644Z|Validating asset output directory|
|2024-06-04T12:43:30.997411Z|Deploying your site to Cloudflare's global network...|
|2024-06-04T12:43:33.927307Z|Uploading... (26/26)|
|2024-06-04T12:43:33.928136Z|✨ Success! Uploaded 0 files (26 already uploaded) (0.23 sec)|
|2024-06-04T12:43:33.928312Z||
|2024-06-04T12:43:34.135426Z|✨ Upload complete!|
|2024-06-04T12:43:35.992598Z|Success: Assets published!|
|2024-06-04T12:43:36.352551Z|Error: Failed to publish your Function. Got error: Unknown internal error occurred.|

What is the deployment ID?

The Pages deployment ID is a unique build identifier.
It’s the UUID in the browser bar (for example, a URL would be dash.cloudflare.com/ACCOUNT_ID/pages/view/PROJECT/DEPLOYMENT_ID where the deployment ID looks something like a398d794-7322-4c97-96d9-40b5140a8d9b).
This ID can help troubleshoot some issues with Pages builds so if you have a failing build make sure you grab that ID for the team to use.

Hello!
The deployment ID is 77c77422-b0c4-4c7c-92a3-443354a5a8ed

I fixed my problem by using ‘wrangler pages download config <project_name>’ and configuring via the dashboard, because apparently something was wrong with my wrangler.toml.