bebraw
bebraw
Explore posts from servers
CDCloudflare Developers
Created by bebraw on 5/24/2024 in #pages-help
Easy way to detect 404 accessed?
Based on Cloudflare statistics, people might be getting 404s for some routes of my site. What is a good way to figure which urls that people actively try to access 404?
1 replies
CDCloudflare Developers
Created by bebraw on 5/9/2024 in #pages-help
How to cache Deno dependencies during a build?
I noticed that in a project of mine where a build takes about 1m 40s installing Deno and related dependencies takes roughly a minute of the build time. I also noticed that Cloudflare Pages supports caching these days and Deno has support for caching as well. Has anyone figured out how to connect these two concepts? Can I tell Cloudflare Pages to use a custom cache location to match the one Deno uses or should I try the other way around?
1 replies
CDCloudflare Developers
Created by bebraw on 4/11/2024 in #pages-help
Custom environment variables set for a Pages project get lost
I have set up a small build as follows: https://github.com/survivejs/website-v3/blob/main/build.sh . In addition, I have specified several environment variables through the UI. Since I rely on workers in my Pages project, there is also wrangler.toml in place. The problem is that when building, it's reporting Build environment variables: (none found) and printenv doesn't show any of the environment variables I defined through the UI. Curiously it's also missing variables like CF_PAGES_COMMIT_SHA that should be there based on documentation. Do you know how to configure the project/Wrangler so that these environment variables don't get lost?
4 replies
CDCloudflare Developers
Created by bebraw on 12/20/2023 in #pages-help
Is there an example of how to use Cloudflare Cron Triggers within Cloudflare Pages?
I want to set up an automated build for my website so it's updated once per 30 minutes. Based on documentation, I set up a trigger within my Cloudflare Pages project but it doesn't seem to show up at the UI. Should Cron Triggers work with Cloudflare Pages? Is there a complete example available somewhere? As a workaround, I could set up cron elsewhere and trigger the build but it feels a bit cleaner to have this logic in the same projects.
6 replies
CDCloudflare Developers
Created by bebraw on 3/7/2023 in #pages-help
Solved - Uploading weirdness - AAGfailed: ParseError
I keep getting messages like this in my build process. The portion is outside of my control:
14:58:30.024 AAGfailed: ParseError: Received a malformed response from the API
14:58:30.024 at fetchInternal (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124423:11)
14:58:30.024 at processTicksAndRejections (node:internal/process/task_queues:96:5)
14:58:30.024 at async fetchResult (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:123594:16)
14:58:30.025 at async doUpload (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:141976:21)
14:58:30.025 at async run (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:141616:26) {
14:58:30.025 text: 'Received a malformed response from the API',
14:58:30.025 notes: [
14:58:30.025 {
14:58:30.025 text: '<!DOCTYPE html>\n' +
14:58:30.025 '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n' +
14:58:30.026 '<!--[if I... (length = 7252)'
14:58:30.026 },
14:58:30.026 { text: 'POST /pages/assets/upload -> 524 ' }
14:58:30.026 ],
14:58:30.026 location: undefined,
14:58:30.026 kind: 'error'
14:58:30.026 } retrying...
14:58:30.024 AAGfailed: ParseError: Received a malformed response from the API
14:58:30.024 at fetchInternal (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124423:11)
14:58:30.024 at processTicksAndRejections (node:internal/process/task_queues:96:5)
14:58:30.024 at async fetchResult (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:123594:16)
14:58:30.025 at async doUpload (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:141976:21)
14:58:30.025 at async run (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:141616:26) {
14:58:30.025 text: 'Received a malformed response from the API',
14:58:30.025 notes: [
14:58:30.025 {
14:58:30.025 text: '<!DOCTYPE html>\n' +
14:58:30.025 '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n' +
14:58:30.026 '<!--[if I... (length = 7252)'
14:58:30.026 },
14:58:30.026 { text: 'POST /pages/assets/upload -> 524 ' }
14:58:30.026 ],
14:58:30.026 location: undefined,
14:58:30.026 kind: 'error'
14:58:30.026 } retrying...
do you know what might be causing this behavior?
2 replies
CDCloudflare Developers
Created by bebraw on 2/17/2023 in #pages-help
How to cancel deployment if any part of the build fails or throws an error?
I set up a tiny build script for my site at https://github.com/ReactFinland/future-frontend-site/blob/main/build.sh . The question is, how can I cancel the current deployment if any part of the script throws an error? Right now that's resulting in semi-working deploys that may be missing files.
5 replies