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

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

Know commit hash of running worker

When the worker is deployed I would like to have a way for the worker to know what is the commit version that was used to build/ship it. Kind of like having an env var that stores the output of git rev-parse HEAD that i can just reference in the worker's code itself.

Cloudflare workers randomly high wall time on New Zealand servers

Hi i would like help with a wall time issue that seems to randomly affect New Zealand traffic connections. For context - Our worker randomly experiences wall time in between Prisma Accelerate queries to Supabase for only New Zealand connections. - We handle 4x more visits from Australia and have visits from other countries that have never even once encountered this issue....
No description

Help! Cloudfare thinks I committed fraud to get my domain.

Hi, a few days back I registered a domain from cloudfare and last night I got a mail by cloudfare with a stripe link that its for ruling out fraud transaction. Actually, I live in India but i used my uncle's credit card to pay who lives in Canada. Also by mistakenly I clicked on the stripe link and now can't access it. What should I do?

Fixed IPv4 for a worker

Hi everyone, I have a worker that fetches data from an api that requires a fixed IPv4. Is there any way to set a fixed IPv4 for the worker? or an alternative solution? Thanks!...

Best way to configure wrangler.toml for team D1 development with per-dev env vars

Question: I’m setting up a Cloudflare Worker with D1 for team development. Each developer will have their own Cloudflare account to deploy/test independently. Goal: - Developers should override local D1 configs (DB name, ID, etc.) via environment variables (e.g., .dev.vars)....

best practice for typegen of secrets in CI?

I would like to generate types in a ci github action but problem is it does not have access to secrets. If I put a blank string value in wrangler.jsonc it will overwrite the actual secret when it's deployed....

Cloudflare openapi schema not up-to-date for hyperdrive mysql

The cloudflare openapi schema for hyperdrive is missing mysql for scheme thus preventing the creation of MySQL hyperdrive connections via e.g. the terraform provider

Batch API Access for `@cf/meta/llama-3.3-70b-instruct-batch`

Hello, I'm currently testing the Workers AI Batch API functionality with LLM models, and I've encountered some issues that I’d like clarification on. Attempt 1: @cf/meta/llama-3.3-70b-instruct-fp8-fast...

Tutorial / Video for "basic" functionality: connecting HTML-forms to Cloudflare Workers + D1

Can somebody please point me to a good "basic" tutorial on the most essential form of interactivity that is relevant for everybody: how to connect a simple HTML input form via a Cloudflare Worker to a Cloudflare D1 database? I would like to see this "without all the hassle" - no local development environment with specific platform / frontend framework adaptors, no use of any "specific" framework by default. Just tell me what the Worker needs to be like and how to ensure it enters the input from the HTML form into the D1 database. Everything I tried - without using specific frameworks like Hono - fails, where it should be exceptionally easy......

Local dev:[wrangler:err] Error: Secret "<name>" not found

⛅️ wrangler 4.10.0 ``` Your worker has access to the following bindings: - Secrets Store Secrets:...

Specific GitHub repo does not work with Workers Builds

Hello! I have a specific GitHub repo that does not work with Workers Builds. Other repos in the same GitHub organization work fine. I suspect this specific repo has issues because it was moved from a personal GitHub account into a GitHub organization and something is cached on the Cloudflare side. - The repo works with the Pages GitHub integration, just not the Workers GitHub integration. - I've repeatedly attempted uninstalling and reconfiguring the Cloudflare GitHub app per the docs. - Renaming the GitHub repository has no effect either, so I suspect there is a different unique GitHub identifier that is being cached by Cloudflare....