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

Cannot find module with vite + react + typescript + yarn build

I'm going crazy trying to figure out the reasoning I'm getting
src/App.tsx(1,53): error TS2307: Cannot find module 'react-router-dom' or its corresponding type declarations.
src/App.tsx(1,53): error TS2307: Cannot find module 'react-router-dom' or its corresponding type declarations.
along with a billion other Cannot find module errors with my new Vite project. It's a vite + react + typescript project that's almost directly out of the box. When I've done this with other projects it worked, so I'm confused where I might be going wrong. Anyone seen this before?...

This site can’t be reached

I have deployed an astro site on pages, but I can't seem to open it unless I open a specific deployment url - URL: portfolio-1bs.pages.dev - Account ID: a2b511460698bf4ccc851c39cba1211f - The URL doesn't open, it says site cannot be reached...

Bulk redirect to custom domain as target url ain't working

So when I try to add two bulk redirects to basically disable my .pages.dev subdomain entirely so that it's not accessible for public, I get the error "cannot save URLs, invalid target url" (watch attached screenshot). Yes I have already purchased the target url (the custom domain) via cloudflare and yes I have already attached it onto the cloudflare page and the page of course is already accessible via the custom domain (I've tested it out so you can be sure lol). Now I don't know if I have to mess with the parameters of each entry for the bulk redirects, and that's why I just kept it at default ......

PHISHING ALERT - REMOVE WEB PAGE IMMEDIATELY

https://webdappsconnectprotocol.pages.dev/ Drains crypto wallets. Remove immediately. This was passed to me on a Discord channel....

Page address for GitHub Repository not working

Hey everyone, I've created a Cloudflare Page using my Github Repository and was able to build successfully, however, when I go to the link given for the project, saigon.pages.dev it does not work.

PYTHON_VERSION = null?

there is some python code in my repo, that doesn't have anything to do with the sveltekit app i'm building. installing python takes a long time and is a waste of resources - how can i override this automatically-detected dependency? can i set the version to null as an env var?

Error: Failed to publish your Function

```20:11:57.829 :sparkles: Success! Uploaded 61 files (9 already uploaded) (1.89 sec) 20:11:57.829
20:11:58.079 :sparkles: Upload complete! 20:11:59.246 Skipping build output cache as it's not supported for your project 20:11:59.247 Uploading to dependency cache...

VPN/ZeroTrust?

How can I self-host a VPN or implement a Zero Trust framework using Cloudflare Zero Trust, and could you clarify how this process works as I am finding it confusing?

Ignore paths in pages `functions` directory

Are there any prefixes that will allow me to ignore files in the functions directory, so I can locate my non-route logic adjacent to my routes? Other frameworks often use an underscore prefix for instance If not, is there a way to specify multiple directories for wrangler to watch during wrangler pages dev? Putting my server code in ./server doesn't trigger auto-refreshes......

How can I connect kv in my local env?

I added kv into the context.env and added kv binding on Cloudflare worker, it works on cloudflare worker now. But the local env is using wrangler and when I configured kv_namespaces in wrangler.toml, --kv in wrangler run command and tried to get value from kv, it threw an error: 'Cannot read properties of undefined (reading 'get')'. How do I get kv to run properly locally? The following are all my code about kv...

pages environment vars

hey guys i posted a question on reddit before remembering discord, maybe you can help out. https://www.reddit.com/r/CloudFlare/comments/18shs8h/how_to_work_with_environment_variables_in_pages/ hey everyone, ...

Cloudflare Pages + TurboRepo + PNPM

I have deployed one of my apps successfully to Vercel (so I know nothing wrong with my apps) I want to deploy on Cloudflare Pages, I get this Error: npm ERR! code EUNSUPPORTEDPROTOCOL. Which makes a lot of sense. as I specified in the root package.json as pnpm to be my packageManager. Even though I set my build command correctly. Cloudflare Pages still always runs Installing project dependencies: npm install --progress=false, before my actual build command. So it fails, as I restricted it to only allow pnpm. ...

custom headers for my specific file type.

Hello everyone I want to set custom headers for my PDF files. I created "_headers " file in my public html folder & ...

Cloudflare strips external domains from form action attribute?

Hey guys, I am running into a problem with HTML forms. On a form action with an external link like so: <form method="POST" action="https://buttondown.email/api/emails/"> In production the action is being stripped like so: <form method="POST"> I have tested my static site locally and it maintains the action but in Cloudflare Page it strips it. Is there a configuration setting in Cloudflare that is stripping this form action?...

help on _redirects

the _redirects is very confusing and i dont understand how the docs work can someone explain to me in a better example in like simple terms for 404 error? i want to make it like so if someones put /sadj.html it says 404 this is what i have for my _redirects
/awtu/* /awtu/404.html 404
/awtu/* /awtu/404.html 404
...

Is it possible to customize functions folder?

Hi, I'd like to rename the functions, is it possible?

Deploying with cloudflare/pages-action but cannot locate sveltekit build directory

I am currently setting up a build script with https://github.com/cloudflare/pages-action I am using @sveltejs/adapter-cloudflare as my adapter as well which says the build directory is .sveltekit/cloudflare. However, github actions cannot find that directory. Docs here says: https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-site/...

Custom Domain for Pages Site

I added the custom domain and the NameServers are pointing to Cloudflare. I don't know why when I go to https://wheatleypoint.com/ in web browser the site can't be reached.
Am I missing some DNS configuration?...
No description