Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to add durable object - not working #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jldec
Copy link
Owner

@jldec jldec commented Jan 3, 2025

pnpm dev currently fails with

20:15:59 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
20:15:59 [types] Generated 0ms
service core:user:__WRANGLER_EXTERNAL_DURABLE_OBJECTS_WORKER: Worker "core:user:__WRANGLER_EXTERNAL_DURABLE_OBJECTS_WORKER"'s binding "MyDurableObject" refers to a service "core:user:worker", but no such service is defined.
The Workers runtime failed to start. There is likely additional logging output above.
  Location:
    /Users/jldec/astro/astro-do/node_modules/.pnpm/[email protected]/node_modules/miniflare/dist/src/index.js:9985:13
  Stack trace:
    at #assembleAndUpdateConfig (/Users/jldec/astro/astro-do/node_modules/.pnpm/[email protected]/node_modules/miniflare/dist/src/index.js:9985:13)
    at async Mutex.runWith (/Users/jldec/astro/astro-do/node_modules/.pnpm/[email protected]/node_modules/miniflare/dist/src/index.js:3632:16)
    at async Miniflare2._getProxyClient (/Users/jldec/astro/astro-do/node_modules/.pnpm/[email protected]/node_modules/miniflare/dist/src/index.js:10166:5)
    at async getPlatformProxy (/Users/jldec/astro/astro-do/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/wrangler/wrangler-dist/cli.js:180408:20)
    at async withTakingALongTimeMsg (file:///Users/jldec/astro/astro-do/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/astro/dist/integrations/hooks.js:28:18)

pnpm build succeeds, but trying to run the build locally fails as well, with a different error:

Your worker has access to the following bindings:
- Durable Objects:
  - MY_DURABLE_OBJECT: MyDurableObject
[wrangler:inf] Ready on http://localhost:8787

✘ [ERROR] Your Worker depends on the following Durable Objects, which are not exported in your entrypoint file: MyDurableObject.

  You should export these objects from your entrypoint, dist/_worker.js/index.js.

@jldec jldec changed the title attempt to add durable object - not working yet attempt to add durable object - not working Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant