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

Is it possible to run OpenNext with Next.JS with NodeJS runtime apis, with Prisma?

Right now - I though the OpenNext package said that it’s possible to run NextJS applications via the NodeJS runtime via workers - however when trying using prisma and a native Postgres connection (not serverless) - I get errors around fs not being available. Do you need to use edge driver and not native PG driver to get this work?...

[Workers Build] bun: not found error

Cloudflare Workers is deployed using the build function. The project uses Bun, and the build process runs bun install --frozen-lockfile, although I have not specifically configured the build. I am getting the following error here, which prevents me from deploying. Deployment was successful until 21 hours ago, but now it is failing. Please help. Below is the build log....

I'm trying to build ffmpeg.wasm for CF worker. Need help

I am trying to build a custom version of ffmpeg.wasm for CF worker.

Workers RPC with typescript

stub.sql is typed as never. the errors is Property 'databaseSize' does not exist on type 'never'.ts(2339) how can I fix this?...
No description

The AI Gateway endpoint for Workers AI with openai-compatible syntax is not working

https://developers.cloudflare.com/ai-gateway/providers/workersai/#openai-compatible-endpoints I copied the curl from your example, replaced the variables with my account id, ai gateway id, and api key; and I get this error: { "code": 7003,...

Using CNAME to Connect Non-Cloudflare DNS Domains to Cloudflare Workers with the Workers for Platfor

If I purchase the Workers for Platforms plan, will my customers be able to connect their domains, which are not hosted on Cloudflare DNS, to the Cloudflare Workers service using CNAME?

Authentication/login issue using CLI

I'm trying to login through cli using
npx wrangler login
npx wrangler login
. It opens a link in browser and asks for permission on the cloudfare page, then it opens a localhost page which doesn't load and says localhost refused to connect. CLI displays the error: Error: ENOENT: no such file or directory, open 'C:\Users\hp\AppData\Roaming\xdg.config.wrangler\config\default.toml' at writeFileSync (node:fs:2352:20) at writeAuthConfigFile (D:\Atomic\newboard-server\newboard-db\node_modules\wrangler\wrangler-dist\cli.js:159075:37) at Server.<anonymous> (D:\Atomic\newboard-server\newboard-db\node_modules\wrangler\wrangler-dist\cli.js:159169:13)...

Can i know how to create an Express App using cloudflare workers

Iam new to workers as i can see the workers are pro honon kind of thing I would love to explore hono also but for now can i know if there is any blog or video sources to know how to build an backend uding express and cloudflare workers...

Use PGLite with Wrangler for local development

Hi everyone, For context, I develop an API with HonoJS and Drizzle. For my local development, I'd like to use PGLite. Database migration works perfectly, I can use Drizzle Studio to see this....

Dog with websocket Hibernation

Hi. I have a need to maintain ~300k Websockets connections, and broadcast to all of them every few hours. because most of the time they will be idle, i plan to use WebSocket Hibernation. since the limit is 32,768 WebSocket connections per Durable Object instance, i need some kind of pool to make a few objects to handle all connections. found this: https://github.com/cloudflare/dog but it does not support Hibernation. ...

"email to websiteemails@[mydomain.xyz] not allowed"

Hi, so I'm trying to set up a contact form for my website using workers, i'm trying to send the email to websiteemails@[mydomain.xyz], it's throwing this exception:
email to websiteemails@[mydomain.xyz] not allowed
email to websiteemails@[mydomain.xyz] not allowed
is it just not possible? I have the email added to account's destination addresses, I don't see why it's failing...

Fetch inside a scheduled Cron Job

Hello, I have a worker that I want to use to ping another worker endpoint every day. When I run the dev server it works great but when I deploy I get 404....

Worker code for workaround to redirect pages with multi-level paths

I've been trying to set up a redirect for a list of URLs with multi-level paths to another multi-level path through the GHL platform, this hasn't been working out so I am now trying a worker workaround in which I input the following code: addEventListener('fetch', event => { event.respondWith(handleRequest(event.request))...

Puppeeter with cloudflare workers

Hello! I recently saw this github repo : https://github.com/cloudflare/puppeteer I have a SvelteKit project hosted on Cloudflare Pages and I would like to add an invoice system. I'm not very talented with PDFs, so I want to create PDF from HTML code. The only way I found was to use Puppeteer to render an html page and save it as PDF. I did all my pdf tests in a separate project, and now that I feel more comfortable with puppeteer, I want to include it to my SvelteKit project....

Worker as a CNAME Host?

So i am trying to use a Worker as a CNAME Host. I managed to setup the worker and connect it to a custom domain and used that domain from the worker as a CNAME Host. It seems to have kinda worked but every time i try it on a domain that's pointed to the worker domain it returns a 522 error. Now i am wondering if it's even possible to do that with the Free Plan? If yes how could i fix that issue?

Binding outside of the fetch handler?

I got an application I'm porting to cloudflare workers. It has domain services that are instantiated at app start. These services hide underlying storage and other implementation details from the application (ie the API). When an API call comes it, it parses the request and passes it on to a domain service which the handler has a reference to (got injected when the route was set up). How would I replicate this on Workers where the bindings are given to the fetch handler? Would you bootstrap the app from scratch (ie, creating all domain services, creating the Hono routes that references these services, ...) on every request and then dispatch the request to the hono app?...
No description

GitHub Actions D1 Migrations

Hello, i would like to build a github action which deploys the worker to cloudflare and then runs D1 migrations after. ```...
No description

Worker API inconsistency

I can get the "Upload Version" endpoint to work, but not the "Upload Worker Module" endpoint even though they use the same fetch body. The "Upload Worker Module" endpoint returns this error: ```json {...

Billing for sub 1ms worker CPU time

Does anyone know how billing is handled for workers which have <1ms CPU time? For instance: Is a 0.7ms CPU time billed as 1ms or 0.7ms? Is a 1.1ms CPU time billed as 1ms, 1.1ms, or 2ms?...

Static Assets on Workers, 404 not found

Hello, I am deploying a website to Workers. _routes.json looks good: ...