Internal build error - says to contact Cloudflare Support

Here's the build output from Cloudflare's pages deployment:
15:35:12.043 Found _worker.js in output directory. Uploading.
15:35:13.276 ✨ Compiled Worker successfully
15:35:13.349 Found _routes.json in output directory. Uploading.
15:35:13.409 Validating asset output directory
15:35:15.189 Deploying your site to Cloudflare's global network...
15:35:17.682 Failed: an internal error occurred. If this continues, contact support: https://cfl.re/3WgEyrH
15:35:17.682 Error: Failed to publish assets. For support, join our Discord (https://discord.gg/cloudflaredev) or create a ticket and reference the deployment ID: d4d82aaa-5b55-402c-83a5-581a5b3570ce
15:35:12.043 Found _worker.js in output directory. Uploading.
15:35:13.276 ✨ Compiled Worker successfully
15:35:13.349 Found _routes.json in output directory. Uploading.
15:35:13.409 Validating asset output directory
15:35:15.189 Deploying your site to Cloudflare's global network...
15:35:17.682 Failed: an internal error occurred. If this continues, contact support: https://cfl.re/3WgEyrH
15:35:17.682 Error: Failed to publish assets. For support, join our Discord (https://discord.gg/cloudflaredev) or create a ticket and reference the deployment ID: d4d82aaa-5b55-402c-83a5-581a5b3570ce
The error only happens when a _routes.json file is present in the out directory. AFAIK, this is a supported way of using Pages (advanced mode + _routes.json to skip having env.ASSETS.fetch in the worker). This error persists even after retrying (previous attempt has the deployment ID 8a1e52ef-257f-4731-a102-c9432d3fd96a) Once I removed the _routes.json, it started working again (deployment eb9d075a-807c-4d2f-92ff-b8a941b8f162). Is this not a supported use case?
2 Replies
Walshy
Walshy4mo ago
What does your routes json look like?
marksfrancis
marksfrancisOP4mo ago
{
"version": 1,
"include": ["/api/*"]
}
{
"version": 1,
"include": ["/api/*"]
}
Oh I see, once I added "exclude": [] , that started working. New _routes.json:
{
"version": 1,
"include": ["/api/*"],
"exclude": []
}
{
"version": 1,
"include": ["/api/*"],
"exclude": []
}
But it's not serving static assets as a fallback anymore 😦 Is there any way to get it to serve static assets without invoking the advanced mode worker?
Want results from more Discord servers?
Add your server