anand248
Explore posts from serversVite plugin does not compile the commonjs module
module is not defined
at eval (/Users/sutikshandubey/invoice001/web-360/node_modules/@babel/runtime/helpers/typeof.js:12:1)
at instantiateModule (file:///Users/sutikshandubey/invoice001/web-360/node_modules/vite/dist/node/chunks/dep-Cyk9bIUq.js:52961:11
Click outside, press Esc key, or fix the code to dismiss.
You can also disable this overlay by setting server.hmr.overlay to false in vite.config.ts.
3 replies
CDCloudflare Developers
•Created by ENSainETY on 10/11/2024 in #workers-help
Save Files Generated in Pages App
after writing the file to bucket I generated a url and saved it in my DB
That URL endpoint points to my own hono endpoint GET request, which downlods the file from R2, and returns to browser, Some indicative code
And GET endpoint code where the above url points to
2 replies
CDCloudflare Developers
•Created by anand248 on 10/12/2024 in #workers-help
I am trying to add a new binding for R2 after deploying my application on cloudflare in wrangler.tom
Found the solution, logs helped me
- "env.production" environment configuration
- "r2_buckets" exists at the top level, but not on
"env.production".
This is not what you probably want, since "r2_buckets" is
not inherited by environments.
Please add "r2_buckets" to "env.production".
2 replies
Nested form objects POST
Server side code was
It was failing the zod validation saying no nested object present. I googled more and found that this is where the world abondons the HTML form post
https://www.reddit.com/r/webdev/comments/ug13uc/how_can_i_make_post_request_with_nested_form_data/
I also went back to usual way of start sending body as
application/json
and start calling the server POST manually with fetch
.4 replies
CDCloudflare Developers
•Created by anand248 on 9/29/2024 in #pages-help
Developing a new application using template - https://github.com/yusukebe/cloudflare-d1-drizzle-hono
i was missing
preview_database_id = "LOCAL-INVOICE-DB" # Required for Pages local development
, in my .toml, I am able to do npx wrangler pages dev
locally which avoids me using vite.3 replies
CDCloudflare Developers
•Created by anand248 on 9/29/2024 in #pages-help
Developing a new application using template - https://github.com/yusukebe/cloudflare-d1-drizzle-hono
I guess, if i can manage to run my D1/Honox app locally using
npx wrangler pages dev
, I will be closer to cloud env of cloudflare. But it fails with below error
✘ [ERROR] Cannot read properties of undefined (reading 'prepare')
[wrangler:inf] POST /login 500 Internal Server Error (10ms)3 replies
CDCloudflare Developers
•Created by anand248 on 9/26/2024 in #pages-help
daisy ui styles not applying on cloudflare built deployment
Solved this problem by adding Daisy UI css CDN on renderer of honox.
2 replies
CDCloudflare Developers
•Created by anand248 on 9/4/2024 in #workers-help
Since worker size limit is 1 MB, i reckon a typical web application must have multiple workers
For faster performance and replication, I reckon smaller workers make more Sense? Does cloudflare replicate ALL workers everywhere all the time or just on first request ?
5 replies