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

workers-help

pages-help

general-help

durable-objects

workers-discussions

pages-discussions

wrangler

coding-help

kv

šŸ¦€rust-on-workers

miniflare

stream

general-discussions

functions

zaraz

āš”instant-logs

email-routing

r2

pubsub-beta

analytics-engine

d1-database

queues-beta

workers-for-platforms

workerd

web3

šŸ¤–turnstile

radar

web-research

logs-engine

cloudflare-go

terraform-provider-cloudflare

workers-ai

browser-rendering-api

analytics

next-on-pages

cloudflare-ai

build-caching-beta

hyperdrive

vectorize-beta

ai-gateway

migration

My staging and production environments got out of sync and so the [[migrations]] (various new_classes and renamed_classes) don't match. is there a way to just "start again" with respect to declaring DOs? i.e., start all environments back to v1 (or any tag really).

How to define the environment to be used for a worker vitest?

Lets say I have mulitple environments: ``` vars = {CMS_API_URL="https://api.systems", ATI_API_URL="https://import.test.io"}...

how do i create analytics dataset?

https://developers.cloudflare.com/analytics/analytics-engine/get-started/ i like to use this but could not find where i can create a dataset in the interface ? am i missing something ?...

Deploying a worker based on an existing Node project

Hello, Let's assume that I have a working Node.js/Express/TS local server with node modules installed, source code, public files, data files, etc. Is there a way I can add wrangler to it, even by modifying the files, without restarting from the beginning? I didn't see any instructions on how to use wrangler with an already existing project in the docs. Please tell me if I am wrong....

Capture Screenshots of `n` website every `x` mins using Browser Rendering

How can I create a Worker using Browser Rendering to capture screenshot of n website every x minutes with Cron Triggers using this tutorial? What would be the strategy? https://developers.cloudflare.com/browser-rendering/get-started/screenshots/...

Deadlock in cache.put() - platform issue or am I doing something wrong?

The following worker code results in a deadlock (no response is ever sent to the client), both in a local Wrangler instance and in the Playground: ```export default { async fetch(request, env, ctx) { let myResponse = await fetch('http://example.com/'); myResponse = new HTMLRewriter()...

Using zlib.deflateRaw

Is it possible to use zlib.deflateRaw? When I attempt to I get an Error 1101 Cloudflare page.

Bug in Wrangler - it randomly adds [object Object] to console.log()'d string output

I think I've raised this before but didn't get anywhere. There's a really weird bug in Wrangler (presumably) whereby, when you console.log() something, if it's over a certain lenght (unclear), Wrangler malforms it and swaps parts of it out for [object Object]. So you'll get something like:...

Is there a way to specify the wrangler file directory?

I'm trying to deploy a static react app to cloudflare pages in a monorepo, everything works but it can't find the wrangler file because it's in a child directory, not the monorepo root.

Uncaught Error: No such module "node:buffer". imported from "worker.js" (Code: 10021)

The title sums it up, also I tried both the nodejs compatibility flag and the new experimental v2 one.

522 error in Cloudflare Workers production

Hey, I'm getting a 522 error on a fetch request in production but everything is running fine locally. Has anyone had this experience? I'm using a reverse proxy and using the FREE workers plan. On a get request I'm fetching a HTML element from another path. It is here that I am getting the 522....

Mailing from worker

I read this page https://developers.cloudflare.com/email-routing/email-workers/enable-email-workers/ and can non found Email setting "Go to Email > Email Routing > Email Workers." in Cloudflare panel. Also I found this page - https://developers.cloudflare.com/email-routing/email-workers/send-email-workers/ - is it working? What I need to set up to allow this function? Where is page to verify Email address? I can not found it in Cloudflare panel. Alternatively I have access to external mail server, but Nodemailer not working with Cloudflare. Some peoples said that is exist setting 'Node-compability' for worker. I try to add this setting to TOML setting file, but nothing changing - Nodemailer still not compiled with worker. So, how I can send mail from Cloudflare Worker?...

UnknownError started appearing. Looks like an internal error

Hi Cloudflare, I started seeing this error for the first time. Happened in a spurt of ~10 at the same time and hasn't happened since but will report back if it does. Was seeing about a steady 500-600RPS at the time that it happened and doesn't correlate with any deploys. Logs show that the worker executed but failed with: ```...
No description

Workers rate limit working only locally

I'm trying to use the rate limit on workers: This works on wrangler dev (local server) but it does not on the cloud. When I try console logging the binding name after triggering the worker fetch, I get an empty object {} for the binding object. The same thing on local has limitVal , period etc which is the rate limit config from wrangler.toml. Has anyone else faced something similar?

Node Http2 request to another origin

Does Cloudflare worker support request to outsource Http2 ? - I want to use node:http2 request to APNs ```javascript import http2 from "node:http2"; //Cannot find module 'node:http2' or its corresponding type declarations. const session = http2.connect("https://api.sandbox.push.apple.com:443");...

Error: Unable to delete cached response

Hi, I just came upon this issue when moving my app to production, I don't have this issue in local or preview environments, only production! The cache.delete(key) throws an exception on a key that exists in the cache, so my cache keeps sending a stale response and I can't remove it to have cache updated with newer response......

How to modify websocket request before sending it to durable object

I currently call:
durableObject.fetch(request)
but I want to send it like this:
durableObject.fetch(modifiedRequest)...

Masking(hide) d1 uuid on wrangler.toml

I am building a worker in Teamcity. Therefore, you need to upload the wrangler.toml file to git. I would like to ask whether D1's UUID should be hidden, or if so, what should be done. For security reasons, I think D1's UUID should be masked. I'd like to ask what you think....

Sub Domain

Hi! Iā€™m beyond new to this sort of stuff and I would assume what Iā€™m going to ask if quite stupid. So I purchased a domain via Regery and I have swapped the name servers over to cloudflare but how do I set up a sub domain so I can receive the incoming emails to that uncreated sub? Iā€™m just having a nightmare and I think Iā€™m just struggling at what to search #workers-help...
Next