Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

Cannot read properties of undefined (reading 'basePath')

I am using Hono with Chanfana with Cloudflare Workers and I can't seem to figure out what is causing the error in the title of this post. I followed this example for nested routing: https://chanfana.pages.dev/advanced-topics-patterns However, it just shows that error. I tried using the exact example in the documentation and it still crashes with that error. Does anyone know how to fix this?...

MCP server /claude desktop and editing dns records

i have MCP(server) tools setup in my Claude desktop app and i would like it to list my live domains and then ask the AI to change/delete/or add new dns records to a certain domain in my list can this be done as at the moment if i ask it to list my zones i get example.com (ID: zone-abc123, Status: active) test.com (ID: zone-def456, Status: active) and theses are not my domains in my account...

Cloudflare Rate Limiting not being in Effect

Hey there, I'm trying to get rate limiting working on my hono app, but nothing seems to be working?? I've configured it correctly and even put down temporary crazy limits and it doesn't seem to rate limit my functions from being called. (Yes, I know it doesn't stop someone from sending 20 requests or whatever but my functions are still being called 20 times, even after checking for the rate limits) jsonc config:...

help with astro app backend functions on cloudflare workers

I've created a minimal reproducible repo on GitHub for an Astro app deployed to Cloudflare Workers. The app includes functionality to call a server-side function that should log messages, but I'm encountering issues: No messages appear in the Cloudflare Workers logs section after deployment No requests seem to be reaching the backend at all...

Deployment Fails Due to "No Space Left on Device" (ENOSPC) Error During NPM Install on Cloudflare

🛠️ Problem Description: Hey everyone, I'm facing an issue while deploying my project on Cloudflare. The build fails during npm install due to a "no space left on device" error. 💡 Things I’ve Tried / Notes:...
No description

Workers Assets 404 Behavior

I was wondering if anyone here has played with with workers assets 404 behaviors? I have a super simple setup with
not_found_handling = "404-page"
not_found_handling = "404-page"
but it won't serve the 404.html i have in the specified directory in assets and instead throws an exception when a page doesn't exist. ...

Api to Add or Update D1 Bindings in Workers ?

Is there any API to Add new D1 Bindings or update existing one on a Cloudflare workers Or is there any Cloudflare SDK ?...

Version metadata lacks timestamp field

I'm trying to get the deployment date of my worker from inside the worker so it can handle the if-modified-since header appropriately. But the binding gives me an object which lacks the timestamp field described in the documentation at: https://developers.cloudflare.com/workers/runtime-apis/bindings/version-metadata/...

Error code 520

Cloudflare Ray ID: 9314ec4d8f4af9af sorry to bother, i don't know where to post for giving help. I try to download some anime on torrentgalaxy.com but the site put a page and say that the hoster of the site, has an error, and they say on the page that i could help by sending the information i've put on top of the message, pls can somebody could tell me where i could put those information for helping the site to fix the error. sorry for the bother,hope you make it....

ETA for being able to set watch paths in `wrangler.jsonc`?

To configure watch paths for Workers Builds (https://developers.cloudflare.com/workers/ci-cd/builds/build-watch-paths/) I have to use the dashboard. The config for it (https://developers.cloudflare.com/workers/wrangler/custom-builds/) is currently not honored (https://developers.cloudflare.com/workers/ci-cd/builds/configuration/). Is there an ETA for when that config option is going to be honored?...

Migrated Astro from Pages to Worker. How can I add queue handler?

I migrated a Astro project from Pages to Workers. This went all well and good no issues. I wanted to see if i could consolidate my Queue Handler from another worker into this worker. But can't find anywhere to say where it goes or if it's even supported. Everywhere i've put it so far wrangler always says the queue handler is missing. Has anyone else had success in this or even attempted this?

help with astro framework deployment to cloudflare workers

I'm deploying an Astro project to Cloudflare Workers following the static assets guide, but I'm stuck with API routing. With React projects, Cloudflare creates separate src and worker folders, with backend code in the worker folder. However, my Astro project doesn't have a worker folder. I tried manually creating a worker folder with code to handle API routes, but all fetch requests to /api/... return 404 errors, despite my worker code being set up to respond with test messages. How do I correctly structure an Astro project for Cloudflare Workers to support both frontend pages and API routes? Is the setup different from React projects?...

Vanilla extract does not work with Cloudflare Vite plugin due to resolve.external

Hey team, I will be cross-sharing this message to VE people as well Vanilla-extract vite plugin does not work with cloudflare vite plugin and returns a following error...

Your Worker exceeded the size limit of 3 MiB.

I want to upload a small project to cloudflare worker but i am hitting the limit for size i guess. i think many people have uploaded 10x bigger project so i think that i am doing something wrong. deleting few node modules did not make any difference. Please tell me a way to upload my project. Its a nextjs project btw.
No description

Is there a way to run AI generated code in a Durable Object?

Tried using URL.createObjectURL then importing it but looks like that's not implemented.

`wrangler types` uses generic type for `DurableObjectNamespace`

I have a Worker with the default being the extended WorkerEntrypoint and a DurableObject DO. runnign wrangler types gives: ``` declare namespace Cloudflare { interface Env {...

With wrangler 4, can the using keyword replace the need to manually manage ctx.waitUntil?

For example to manage a db connection, would the below work as expected? And if so, any drawback vs the old waitUntil approach? ```ts const getConnection = async () => { const connection = await getDb();...

Contradictory info: is Browser Rendering available on free plans?

Hello, I'm trying a new app that might need browser rendering. The documentation asserts that this feature is accessible on the free plan. It even lists usage limits for it. However, when I tried to add it to my worker as a binding in the settings page, the feature was listed as part of the paid only services. Which one is correct or am I missing something? ...

Max CacheTtl Allowed In Cloudflare workers

Is there any limitations on max cache time to live allowed in Cloudflare workers cache API ``` cf: { cacheEverything: true,...

Error 1102: Worker exceeded resource limits

I have a question regarding CPU time on Cloudflare Workers. I'm deploying a web application on Cloudflare Workers using OpenNext + Next.js. To bypass CORS issues, I added a route handler that proxies the requests. However, even though the free plan limits CPU time to 10ms and I'm only performing a fetch and returning the response, it still consumes between 60 to 120ms of CPU time. Why is that? app/proxy/route.ts...
No description