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

Getting error on wrangler pages dev. I have following file /functions/api/xyz/index.ts

X [ERROR] service core:user:<project-name>: Uncaught SyntaxError: Identifier '__cf_cjs' has already been declared at null.<anonymous> (functionsWorker-0.8999551136653665.js:999)...

redirects not working with trailing slash inputs

I have an astro site hosted on cloudflare pages. The url scheme changed recently to move blog posts from the root to their own blog subdirectory (http://example.com/post -> http://example.com/blog/post). As such, I'm trying to set up redirects from the old post urls to the new ones, but unfortunately, the redirects are not working for inputs which have a trailing slash. For example, example.com/post will redirect to example.com/blog/post, but example.com/post/ will not. I've tried both astro's c...

How do I read environment variables from a SvelteKit website?

Hiya, I can't find any resources on how to set up SvelteKit to read environment variables from cloudflare pages environment variables set in the cloudflare dashboard. If anyone knows how to do this, it would be greatly appreciated :-)...

Vite build fails with `EISDIR: illegal operation on a directory, read` - how to debug?

I have an Eleventy project, and I'm trying to integrate Vite to build the assets. The npm run prod build works perfectly on localhost and on GitHub Actions. However, every single time it fails on Cloudflare Pages, with EISDIR: illegal operation on a directory, read. Apart from the specific OS, all three environments are the same. There's nothing obviously wrong or suspect on the page it complains about (e.g. src="" or other). The path is definitely a file and not a directory. Any ideas what could cause this? How would I go about debugging this, since the problem seems specific to Cloudflare Pages - I can't reproduce it on local, and since the errored build isn't deployed, saved, or downloadable, I can't inspect the file it complains about....

Fetching from `api.fiscaldata.treasury.gov` returns 525

No matter what I do, I seem to get a 525 error when trying to fetch data from api.fiscaldata.treasury.gov via a worker Here is a sample url: https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/debt_to_penny?sort=-record_date&limit=1 When I run the worker locally everything works fine. Here is my request simple request just to test: ...
No description

assets of my cloudflare pages returns 404

Hey there, while I haven't change anything on my cloudflare pages more than 3 months, all the assets of my pages started to return 404 for some reason. I wonder if there are any recent changes causing this, so I can adapt myself. https://b81e6a00.tamtek.pages.dev/ Thanks in advance!...

Nuxt server functions have Cloudflare worker Requests with method ‘GET’ when I should be ‘POST’

And only when run locally. The deployed page does not show this problem. I want to realise an upload for cloudflare images and I'm trying to hide my api key this way....

Possible to disable .pages.dev url after adding custom url?

I added a custom url to my project - can i turn off the default .pages.dev url or can I make a page forwarding rule? Also curious about the deployment build url, i like the auto build/deploy but dont want a live url of the deployment, can i turn that off just the url or is there a dynamic page rule i can set?...

For Remix.js what is the wrangler deploy entry point?

After setting up Remix.js app using npm create cloudflare@latest -- my-remix-app --framework=remix and wrangler deploy I get this error. I assumed Remix's build/server/index.js would be it. Also tried functions/[[path]].ts to no luck. Thanks!
No description

Delete Cloudflare App deployed using pages

I deployed an app using cloudflare apps and now the same dashboard page is showing deprecated. I want to remove the app but I can't find the setting from where I can delete that app.
No description

D1 error

I have a problem if anyone can help, my D1 database is locked getting this error "D1 is overloaded. Too many requests queued." because of spike in traffic from a bot, I fixed that with firewall rule, but D1 database still locked anyone knows how to relealse or unlock it?...

Serving Static Files - Hono

So I am trying to convert a previous project of mine from express to Hono (IDK if its the best option or not.. I'd like some feedback/advice). I always start by deploying static stuff to check if everything is according to plan, however I don't seem to be able and serve my static 404 page. From what I gather I have to add to the toml file the following: ...

Custom domain for page

I registered my One.com domain with cloudflare and have a running page but i am so confused how to make the domain point to the page now.... I don't have a ip4 from the worker to create a A record for?

Does @node-rs/argon2 work on Cloudflare pages?

When I try to build locally I get the following error. Im using a M1 MacBook. ``` ✘ [ERROR] Build failed with 1 error: ✘ [ERROR] No loader is configured for ".wasm" files:...

Site uploaded to pages is being reflected in Cloudflare's pages URL but not on sites domain

I'm experimenting with with pages. I've a site which already have a domain name which is attached to pages. Also DNS of this domain is managed by Cloudflare. Up until now, whenever I added new content to pages (via browser itself), it used to get reflected on my site whenever I accessed it using sites domain. But one of my recent change is not getting reflected on site. However, I can see the changes on pages.dev url. I'm suspecting it's some sort of caching issue. But really needed someones help in fixing this. Necessary details:...
No description

Unable to connect to any of the browser sessions

I have 2 browser running from last 3 days, both are idle and doesn't have any connectionId. Still I am unable to connect any of them and also can't start new as the 2 limit reached which are stalled and useless sessoinId. ``` [ {...
No description

500 Error on some of my pages

Since yesterday I have been getting this error on some of my pages. It's an Astro SSR site but most pages are static. The site builds fine and works locally buy once deployed i'm getting the message below on my posts and products. `Something went wrong An internal error occurred. ...
No description

pages responding incredibly slow

idk if this is just me but my site on cf pages isn't loading within reasonable time. my network is not the issue bc it's stuck on "waiting for server response" a lot of the time. speedtest is returning a normalish speed for download (700mbps) and i don't have this issue anywhere else so i'm assuming it's not me. is this a cf issue or is anything else wrong? https://notpyx.me...
No description

Attempting to locate DNS IPV4 Address

Hi, so I'm pretty new to all of this stuff, and I've been wondering and trying to find out where I can locate the IPV4 address. I've tried looking on my hosting site off of Porcupun static hosting, but I'm unable to find it. If someone could help, please.
No description

Pages Build Process: replace npm install with bun install

is there any way to do this? I already set the build command to bun run build but I can't find ways to change the npm install command
No description