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

Rate Limiting API open beta feedback

The new Rate Limiting API for workers (https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/) is quite interesting to e.g. API a rate limiting mechanism to a API hosted on Cloudflare Workers. However, I think there is a room for improvement to even offer more opportunities leveraging this API. 1) More Rate Limit result details like remaining and reset window ...

Error: Failed to load external module cloudflare:workers: Error: Cannot find module 'cloudflare:work

Hi, anyone got this error, this is from a new project created for next where I am trying to use the typed env variables using the guide in the documents https://developers.cloudflare.com/workers/languages/typescript/ last week I had a different error https://github.com/cloudflare/workers-sdk/issues/8726#event-17153868590...

Workers performance alerting

Hi guys I was wondering how everyone handles sending alerts when errors occurs in workers. I was thinking like receiving an email when the worker is responding with too many 500 status codes with a given threshold?...

Service Bindings on NextJS

Hey everyone, I'm trying to get a NextJS setup on workers. My NextJS app needs to make a call out to another worker, which is setup as a service binding. I've gone through the steps of using wrangler types to generate types, have the latest versions of everything. But whenever I make a call to getRequestContext() I get an error saying that the Cloudflare Request Context can't be loaded. The other challenge I've got, is that when I set export const runtime = edge I get another error saying ```...

How to manually trigger a cron job worker?

Hi, I have a worker deployed with a cron trigger set and now I want to manually trigger the deployed worker without waiting for the cron trigger time. Is it possible? how?

silly question about workers billing

hi. i'm currently screwing around with workers to see if it's viable for a thing i want to make. i'm using the free plan and i very specifically do not want to be charged (but cloudflare has my payment details because i'm using the free tier of r2). my understanding is that the free tier of workers limits you to 10ms CPU time per request and just kills the worker after that. and yet my median CPU time is showing as 617ms, see the attached image. is there a way i can verify if this is right or not, and more importantly, is there a way i can check if cloudflare has suddenly started billing me for workers paid or not...
No description

Help migrating from Vercel to Cloudflare Workers

I encounter with diverce to migrate from vercel to cloudflare workers, but every time I try to build I get this error https://github.com/safecircleia/Demo/tree/cloudflare-migration I'm really new into nextjs and cloudflare workers, so It might seem a small issue but I've been stuck at it for more than a day...

Emulating R2 locally

Hello! The R2/worker docs state: By default wrangler dev runs in local development mode. In this mode, all operations performed by your local worker will operate against local storage on your machine. I have a worker pulling files from R2, so no problems there. Also the wrangler deploy is quick, so generally I have no need of local storage. I am curious however what "operate against local storage on your machine" means. Is the general idea that we will setup env.BUCKET_NAME to point to some local folder to make this work? Does the R2 get (e.g. env.BUCKET_NAME.get()) somehow grok this local filesystem link?...

Uncaught Error: No such module "node:process"

I have an issue after I uploaded the functions Failed to publish your Function. Got error: Uncaught Error: No such module "node:process". I have compatibility_date = "2024-09-23" in wranget.toml....

"Update name in Wrangler configuration file to match deployed Worker" even though name is the same

Hey everyone, I took an existing github project of a cloudflare worker, removed my old deployed workers via the dashboard and then created a new one from that github repo. Reason being that I'm switching from my self-built github actions to the new worker preview feature. So I enabled it and now every time I push, the cloudflare integration opens a pull request to change the name of the worker in the worker configuration. The issue is that the name is exactly the same, and said pull request ends up with no file changes. ...

Unable to Authenticate request with 10001 error code

In workers for platform I can't delete my worker anymore. The same code stopped working 😦 I double checked the api key, account Id, email, verified the token. same for rest or js sdk. ...

how to view console.log when running via `wrangler dev --remote`

Hi. I'm using react-router v7 and tinkering with browser bindings. I'm at a loss at how to observe server-side console.log when running wranger dev in --remote mode. I only see a bunch of [wrangler:inf] GET ... logs on the terminal. Help please!

Wrangler dev - local https?

Does wrangler dev create a ssl certificate for me on 127.0.0.1?

Startup Time Exceeded Despite CPU Profile Showing <400ms

Hey all, I'm running into a weird issue while deploying a Worker. I’m getting an error saying my Worker exceeds startup limits:
✘ [ERROR] Your Worker failed validation because it exceeded startup limits.
To ensure fast responses, there are constraints on Worker startup, such as how much CPU it can use, or how long it can take. Your Worker has hit one of these startup limits...
...

DNS missing for custom_domain = true worker

Hello there, I'm successfully deploying a worker with custom_domain = true, but the worker isn't responding on the domain because there are no A or AAAA records in my DNS for that zone... I thought the custom domain deploy would automatically create them, but I guess not. Can you tell me what DNS records I would need to add to get the worker to respond on my zone?

Enable ip geolocation on cloudflare worker on workers.dev domain ?

Is it possible to add the ip geolocation on a cloudflare worker which is served from *.workers.dev ? If so how to do because the documentation don't mention it. https://developers.cloudflare.com/network/ip-geolocation/...

Our app is down. Need to talk an agent urgently

Hi there, we are not able to initiate a live chat via the app. We are on the business plan and need to speak to someone. Could you please let me know how we can connect?

Unable to Authenticate request with 10001 error code

I want to create a worker and put a script into it, based on the explorations i came upon this script, but I'm getting when i run the script (attached a file).

Error using Mysql2 with Vite

I'm trying to use Mysql2 with Vite + React Router but some poly fills seem to not work correctly for me. When importing in mysql2 in any file it fails to load wiht the error ```js buffer.hasOwnProperty is not a function...