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

Pages is installing bun 1.0.1

The latest version is 1.0.21. This causes my build to fail. Account ID: b7624c46ee3377d0b12e2bf893c00685...

ReferenceError: crypto is not defined

I have a javascript file which makes use of crypto. This file is used by both my Cloudflare Pages Functions and my Node preinstall script when running npm i. Locally, on my PC, both run fine but on Cloudflare Pages the preinstall script crashes with ReferenceError: crypto is not defined. If I add
import * as crypto from 'crypto';
import * as crypto from 'crypto';
at the top of the file, the preinstall step will run fine but the Pages Function will fail to build with ```The package "crypto" wasn't found on the file system b...

Which object holds environment variables (Nuxt)

I just configured & deployed a nuxt app to be deployed to cloudflare pages. Environment variables are all setup, but I can't seem to access them, like to setup my drizzle DB connexion : (I'm using t3-env to valdiate & access my env vars : https://env.t3.gg/) ```ts...

Cloudflare pages - 500 errors on accessing new deployments

Our new deployments are building but then throwing javascript errors when we try to access the deployed app. But we havent changed anything - code that was deploying correctly on Friday is suddenly throwing 500 errors. The error is about this “Cannot access ‘da’ before initialization\n at chunks/handlers/renderer.mjs:1:653972” - but nothing has changed in the code that would lead to this error. So I am confused. We have a nuxt 3 app deployed to Cloudflare Pages. The error seems to suggest that cloudflare is running into error when initializing our app - but we are redeploying code that hasnt changed - and it still fails - this seems weird. Any pointers would be greatly appreciated! Thanks....

Suspicious activity or security error in chrome after adding custom domain

It was okay with penrage.pages.dev but when I added penrage.com custom domain the https://penrage.com/api/auth/signin shows suspicious activity why is that ??

blog front-end fail

Hi I was trying to learn how to use cloudflare and I tried to hop on the blog front-end tutorial but i keep getting this : Uncaught Error at o (history.ts:494:11) at Y (hooks.tsx:353:3) at ie (hooks.tsx:343:10) at Eo (react-dom.production.min.js:167:137)...

Access bindings in dev

I'm following this tutorial: https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-site/ And I've also tried the Qwik tutorial. I'm running the dev server using npm run pages:dev so using wrangler. In the case of Qwik, in the console I can see the message: ```...

Deployment errors on deploying nextjs site

The site is working well with GitHub pages but having issues with cloudflare pages

unable to launch cloudflare website gulp: not found

heyo, insanely new to all of this and i just tried launching a portfolio website that i worked on (and plan on working on further later on) and i get the following right before it gives me the "Status: Failed" message: gulp: not found as far as my knowledge goes, i have everything gulp related installed, setup and correctly written down, i've double checked and tried looking stuff but i was unable to find an answer (i might be blind. idk) pages.dev: maybescripted.pages.dev...

D1 binding + staticFormsPage

Hey all, i cannot figure out how to use the d1 binding along staticFormsPlugin. right now it doesnt even run the staticFormsPlugin ...
No description

Issues with functions routing with Nuxt.js

So I've been building out an API on pages using functions by connecting a git repo with the following structure ``` functions ├── ping.js └── index.js ...

Implementing Barcode scanning on my Webiste

Hey i tried implementing QuaggaJS and Instascan. Nothing worked out. Would be nice if someone could give me a hint. Or even better prov of concept code. LG TCT

pages-action branch preview URL

Is it possible to grab the branch preview URL out of cloudflare/pages-action? I'm trying to simulate the nice chatops-y build status message the cloudflare build process creates when building in Github instead for more control.

Bindings not available at build time

I have a SvelteKit app that has some prerendered api/page routes. These routes should ideally be rendered with data from KV/D1, but despite the bindings being available in non-prerendered routes runtime, they are not available during build time. Is this the expected behaviour and if so, what's the recommended way around this?

Nodemailer

Hey everyone, I've got a website that deploys to Cloudflare Pages but ever since I've added a form that uses Nodemailer, my deployment is failing. It's because CloudFlare Pages environment doesn't support all Node.js modules. Is there a work around this without using third party email senders?

v2 engine build dependency errors

Builds with zero errors in v1. Builds with zero errors locally using the same npm and node versions as v2 build engine. In v2 prod: npm ERR! ERESOLVE could not resolve npm ERR! Could not resolve dependency (react versions)...

Download deployments

Can you Download deployments from Cloudflare Pages?

Can we have different Preview ENV Variables, for different branches?

We have several different staging/test environments we use to test various work across teams. With Vercel we were using designated deploy branches, that had their own domain & env vars setup. We would have branches like env/dev-1 that deployed to dev-1.test.com with all the correct ENV vars for that environment. I havent' seen a way to have deploys (GH Actions, wrangler) that have different env vars. Is there any way we can handle these?...

www subdomain redirect stopped working after a while

Since yesterday I have pointed a custom domain to my CF pages via the automatically added CNAME pointing to the apex. Then I first tried to add the www subdomain as another custom domain which worked for an hour and then returned 503 again. Afterwards I removed the www subdomain again and tried to add a bulk redirect which never worked. In the end I added a page rule to redirect which worked immediately but then also stopped working after some time and I get again 503s. ...
No description

How can I bypass the cache on a page to get new SSR content?

I have a site served on Cloudflare pages along with a worker for some SSR content. One of my pages is SSR and adds a modal to a page if a certain cookie is present and then instructs for the cookie to be deleted. This modal doesn't appear and the cookie isn't deleted. The behaviour works as expected when hosting locally. I tried bypassing the cache by adding a query parameter for when the modal should show e.g. example.com/?modal, however this doesn't change the resulting HTML....