shay
Explore posts from serversCDCloudflare Developers
•Created by shay on 7/8/2024 in #workers-help
Unable to bind durable objects on Remix + Vite project
Hello, I'm trying to incorporate a durable object into my project that I have recently moved to Vite (from the classic Remix compiler). However I think this issue may be more relevant to Wrangler due to the nature of the error. I'm on MacOS and using Node 21.6.2.
When running
wrangler types
(which in turn runs my Vite build process):
service core:user:__WRANGLER_EXTERNAL_DURABLE_OBJECTS_WORKER: Worker "core:user:__WRANGLER_EXTERNAL_DURABLE_OBJECTS_WORKER"'s binding "BasicDurableObject" refers to a service "core:user:worker", but no such service is defined.
Am I defining my binding incorrectly? I don't really understand what to do with this information and I couldn't find anything online.
My object, which is exported from my main
file:
binding: 3 replies
CDCloudflare Developers
•Created by shay on 2/8/2024 in #workers-help
Failed module resolutions using `pg` and Drizzle
Hi there, I'm using this Remix template, which works well on its own, but when I attempt to use the
pg
package to interface with my remote Postgres database, Miniflare is suddenly unable to resolve a number of dependencies after Remix finishes building.
Reproduce
1. npx create-remix@latest directory-name --template https://github.com/remix-run/remix/tree/main/templates/cloudflare-workers
2. cd directory-name
3. npm install pg drizzle-orm
4. npm install --save-dev @types/pg
4. Create an app/store.server.ts
:
7. And import it in a route:
8. npm run dev
- see above errors
platform: node
Naturally, I would like to not build for Node and be forced to use node_compat, but complying with the previous error anyway yields the following:
3 replies