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

Hello I enabled functions and Static

Hello, I enabled functions and Static Forms Pages Plugin. Now Cloudflare rewrites the Javascript in my static assets (replacing .innerHTML="<form></form><form></form>" by .innerHTML="<form method="POST"><input type="hidden" name="static-form-name" value="null" /></form><form method="POST"><input type="hidden" name="static-form-name" value="null" /></form>"). Obviously this breaks the JS + the computation of the integrity hash, and I donā€™t see the point of this rewrite as this file is complet...

Issues to run Pages functions locally

Hi , i am trying to run pages functions locally and getting error "āœ˜ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above." Wrangler is compiling the pages function to worker successfully . My env is Ubuntu 23.04 + node v20.5.1 + npm 10.0.0 +Vite - React . Am i missing something ?

I am using D1 with Pages functions Was

I am using D1 with Pages functions. Was working fine. My D1 database had a binding in the function/worker of DB, suddenly in production the binding is __D1_BETA__DB, anyone ever have seen this happen? Locally still works as expected (eg. DB). I found that this prefix exists in miniflare codebase but really confused to see this pop-up in my production project....

Hi James ā€“ yes I believe ` cloudflare

Hi @Better James ā€“ yes, I believe @cloudflare/next-on-pages is what's being used under the hood (it's a bit opaque, but I see that in the docs and in node_modules). Will test out the new release, thank you!

Hi everyone

Hi everyone, Need some help deploying Nuxt3 server middleware on cloudflare pages/workers ...

I ve seen this error mentioned there

I've seen this error mentioned there earlier as well. I'm looking for best ways to debug and profile to see which part of our application causes the Error: Failed to publish your Function. Got error: Error: Script startup exceeded CPU time limit our main app is Remix app. Like what all happens during the startup? Like could I just achieve same setup with some local test? I already tried profiling importing the compiled functions handler. Is this the correct way? Would make me sad if we'd have...

Pages Functions with SvelteKit

Am I being dense, but should my /functions folder be in my root dir for the build? or my actual top level of a repo? Have tried both and neither seem to be working? Also are files with a - supported i.e /functions/early-access.js to domain.com/early-access? Trying to get a simple hello world function working and just getting a 404 with nothing else šŸ„²...

hey has anyone been able to figure out a

hey, has anyone been able to figure out a solution to hosting nextjs apps on workwrs? There seems to be an issur with the build sizes.

stevefrench 9072 This is definitely an

@stevefrench39 This is definitely an accessibility concern. I had though reading some of those usage suggestions. Maybe use the browser's inspector tools or Lighthouse to point out that color contrast issues.

Service bindings

Hi friends, has anyone been able to use service bindings with pages? Running this command npx -y https://prerelease-registry.developers.workers.dev/runs/3446839001/npm-package-wrangler-2162 pages dev ./public --local --persist --service TEST=a when I print out my context I get { ASSETS: Fetcher {}, ENVIRONMENT: 'development' } no service binding there. Thank you for your help!...

I d recommend going to the r2 storage

I'd recommend going to the #r2 channel

Interaction with dbs

1. Assuming you have a Function at /functions/api/formSubmit you should fetch /api/formSubmit (notice the lack of the /functions part) 2. a heads-up that regular databases are not compatible with Workers or Functions, you'd need to use a database that has an HTTP interface such as Supabase or the newly opened #d1-open-alpha...

While Functions are in beta any requests

While Functions are in beta any requests for static assets on the same project as a Function will take a request

Hmh can you get a more specific error by

Hmh can you get a more specific error by potentially wrapping your functions in try... catch... blocks? Do you get a plain 500 error or cloudflare's timeout page?

ā€œPagesā€ as an RBAC role is on the

ā€œPagesā€ as an RBAC role is on the roadmap for Enterprise