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

PNPM cache not working on Workers build

Have not been able to make caching work for pnpm in workers build. Couple of issues I found: Confusing docs: - looking at the docs it states that the caching folder for pnpm is .pnpm-store - When outputting the location using pnpm store path it says it is /opt/buildhome/.local/share/pnpm/store/v3...

Cannot use different environment vars in feature branches

How hard can this be? I just need to have a "staging" environment where different API keys from the prod version are going to be used. ive gone from using all the QoL things from cloudflare like the dashboard and github integration to now setting secrets with the CLI, disabling the github repo connection altogether and using two workers, one for each environment...

What is the exact point of preview_id (preview namespaces) compared to normal/plain (idk the diff)?

I just noticed that using --preview with npx wrangler@4.10.0 kv namespace create TEST_KV_FOR_PREVIEW --preview will just append _preview in the name of the KV namespace, I don't see anyt other diff, how is it diff from just creating a normal KV namespace without --preview and just use its id as preview_id ? Also, why only wrangler CLI has this --preview and no such option when creating a KV from KV dashboard? Am I missing something? feel free to correct....

Failed: error occurred while checking out repository

``` 2025-06-04T14:55:12.707Z Initializing build environment... 2025-06-04T14:55:21.871Z Success: Finished initializing build environment 2025-06-04T14:55:21.977Z Cloning repository... 2025-06-04T14:55:23.487Z Failed: error occurred while checking out repository...

Server failed to respond

Hey guys, I need help really quick. When I published my site to workers, I keep getting: ```json...

lazy loaded modules in worker

I'm trying to lazy load some modules and it says that they are not found with the error No such module "ping.js" ``ts commandName = interaction.data.name; try { modulePath = ./${commandName}.ts`;...

workers builds can't access Secrets?

title here's the error in the log: ``` 12:59:25.473
12:59:25.474 ✘ [ERROR] A request to the Cloudflare API (/accounts/account id/workers/scripts/fry-api/versions) failed....

File Uploader - Zip Archive

Im building a service, client browser upload multiple files to worker using multipart upload proxied by CloudFlare workers. since i don't want to handle uploading multiple files, Im creating a container before upload, i tried using bin container, concat blobs and saving the offsets in a durableObject (fast and supported by most browsers), down side is on the download, no problem downloading individual files, but when i want to download multiple files i need to archive them first, i tried archiving on fly, extracting files from bin to zip archive with no compressions, memory is ok but i hit cpu time limits. tried using zip container, client will first have to archive the files before uploading but now the upload takes 30% more time. i need to support 250 GiB files, and download should be available immediately after upload finish. anyone ever faced this use case before? i can do async job as soon as upload finish to archive the files but its complicated and download will not be available immediately after upload....

Workers internal fetch 100s timeout

Hey folks, we using workers as cron task runner to trigger jobs on another server by sending HTTP POST and waiting for the response to make sure task did not error out. But seems like internal fetch in workers is limited to max 100s and after that limit worker just drops HTTP connection? Could we somehow increase the limit?...

availability of experimental mixed mode in `new Miniflare()` or `unstable_startWorker`

With --x-mixed-mode available in wrangler dev, is there an experimental option in the constructor of config object for miniflare/startWorker? So that we get mixed mode when running workers programatically?

Configuring timeout for cloudflare:sockets

Hi, is there a way to configure a timeout for cloudflare:sockets connections?

Significant TTFB delay on Cloudflare Worker vs Vercel using same OpenNext setup

I'm using OpenNext to deploy a Next.js 15.3 site with ISR and streaming enabled. When deployed to: Vercel: the initial document load (document in Network tab) is ~389ms...
No description

Workers in the preview deployment are encountering unexpected failures.

I added several workers and activated the preview feature for them. They were operating normally until a few hours ago, but now the preview workers are failing, while only the main branch (production) remains functional. Are there any current incidents or maintenance activities? Or is there something I might be overlooking? I created a new branch from my production and altered a character to check if my code is at fault; however, it seems irrelevant... it continues to fail with the error: ```...

workerentrypoint and exportedfetchhandler

A workerentrypoint cannot be used as the main fetch handler correct? the reason i ask because every example of an rpc workerentrypoint i've seen includes a dummy fetch usually with a response 404. just wondering if instead of proxying directly to the rpc servicebinding fetch i could have it handle all incoming fetch?...

Internal only headers

Is it possible to add headers to a response which will only be present in workers/snippets that interact with that response within cloudflare. Trying to pass a version from a worker to a snippet without risking revealing that to clients.

Workers and bots detections

Do cf workers detects incoming requests from bots? We have email marketing features that are on cloudflare, and we would like to use the bot score that is coming on the headers. We know pages have this feature, but unsure if workers does and it is functioning well ...

Apps that deploy normally under Pages will not deploy on Workers

Has anyone tried to address the "Deploying to Cloudflare's global network", the error that occurs when trying to build and deploy apps to Workers? There's no documentation or any help anywhere. Here is the error: npm warn exec The following package was not found and will be installed: wrangler@4.18.0 14:05:18.268
14:05:18.268 ⛅️ wrangler 4.18.0 14:05:18.269 ───────────────────...

What is the Workers timeout?

Got a request to implement the IDLE command into my CF Workers IMAP lib. That would mean keeping the TCP connection alive for longer periods of time. From what I understand Cloudflare bills based on CPU time, rather than the total time it took for the Worker to finish, so in terms of billing it shouldn't be sky high. The problem is that it is definitely not the use case for a Worker (well, the exact opposite really). Theoretically, though, after what time would the worker process be terminated?...

Giving external dev access to Workers UI (but only for one worker)

As the title sais. We have an external developer that has some API acess to the workers and can do things. We just dont want to give that developer too much access. I cant se that an account can only have granular access to one particular worker? Anyone solved that in any way? We can solve it by us doing some of it and/or giving closed access to some vnc solution or something, or is there any other way? Would speed things up....

How to exclude specific subdomains (like api and id) from triggering a Worker?

Hi everyone, I’m trying to configure my Cloudflare Worker so that it runs on all subdomains of my domain (*.mydomain.com) except for a couple of specific subdomains — namely apimydomain.com and id.mydomain.com. For these two subdomains, I want the Worker not to be invoked at all. I’ve tried:...