marksfrancis
marksfrancis
CDCloudflare Developers
Created by marksfrancis on 8/16/2024 in #pages-help
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?
4 replies
CDCloudflare Developers
Created by marksfrancis on 8/16/2024 in #pages-help
Reference architecture for a pages app with background tasks
I'm looking for a reference architecture for an API / website that also has background tasks, such as queues, cron jobs, etc. Is there a recommended way to build such an app? I understand that I can use a separate worker and share the same queue (but presumably not in the same codebase?), or I can drop down to "Advanced Mode" with _worker.js, but what's the recommended architecture?
1 replies
CDCloudflare Developers
Created by marksfrancis on 7/21/2024 in #pages-help
Image Transforms on pages
I have a pages project with an image transform endpoint. As far as I can tell, I can't use Cloudflare's image transform features because the pages function isn't running in the same zone as my website's zone. I assume this is because Custom Domains in Pages are really just DNS record aliases - it's not moving the function to run in the Cloudflare zone where Images is enabled. For presumably the same reasons, wrangler.toml's routes option doesn't work either (Configuration file for Pages projects does not support "routes"). I still want to have an entire website running, but I want 1 API endpoint which optimises images dynamically. What's the best way to solve this? For example, do I need to mix and match a separate worker just for the image resize and a pages project for everything else? - pages.dev: https://fast-images.pages.dev/ - deployment ID: 5839679a - account ID: a743ed06cad7fe7565e231b80cb268b2 - zone ID (for images): 539e268afac9443cf7dc601b8e8e599d
5 replies