9 Replies
Actually, the fix you mentioned is for a Page issue, and I'm using Workers so I already have my wrangler.toml file containing the
{ binding = "MAIN_DB", database_id = "<ignored>", database_name = "db_name" }
; this is not a workaround for workers, it is the way it should work (doc: https://developers.cloudflare.com/d1/get-started/#4-bind-your-worker-to-your-d1-database)
Anyone achieved to use a D1 instance locally, on some real web app (Next|Remix) inside a worker using wrangler dev --local --persist
?Get started Β· Cloudflare D1 docs
Documentation for Cloudflare D1, a SQL database.
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Thatβs the reason : https://github.com/cloudflare/wrangler2/issues/2253#issuecomment-1322302245
GitHub
π BUG: ReferenceError when using D1 locally Β· Issue #2253 Β· cloudfl...
What version of Wrangler are you using? 2.4.2 What operating system are you using? Mac Describe the Bug I have a Remix app in a worker and D1 binding appears as undefined (in local). Other bindings...
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Yes I guess Iβll do that. Just need to check if service binding can be done on page (which I know nothing about)
No problem π
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Nice thank you
@tomsherman By any chance, do you know if Page service is as flexible as Worker service? Can I use the wrangler.toml all alone to describe my resources and deploy?
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Haha ok, I'll just use neon.tech or supabase for the DB right now; then I'll migrate to D1.