Developing a new application using template - https://github.com/yusukebe/cloudflare-d1-drizzle-hono

I am adding auth flows using Lucia to above template which uses D1, Drizzle & Honox. I am using pages. My major problems are around common js modules. I want to use "Resend" library to send emails. IT runs fine once deployed but locally when I run the application using "vite" it gives commonjs related errors, I am trying to fix them with Vite.config.ts and @originjs/vite-plugin-commonjs but no success till now. Another option is to run the app using npx wrangler pages dev but it gives error around D1 access. Did you experience same problems ?
1 Reply
anand248
anand2484w ago
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) 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.
Want results from more Discord servers?
Add your server