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

Durable Object Example Produces Warning #19938

Open
sinkingpoint opened this issue Feb 12, 2025 · 1 comment
Open

Durable Object Example Produces Warning #19938

sinkingpoint opened this issue Feb 12, 2025 · 1 comment
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/

Comments

@sinkingpoint
Copy link

sinkingpoint commented Feb 12, 2025

Existing documentation URL(s)

https://developers.cloudflare.com/durable-objects/api/storage-api/

What changes are you suggesting?

Creating a new project with the above example, and the following wrangler.toml produces an error upon running locally with miniflare:

▲ [WARNING] workerd/server/server.c++:1833: warning: A ServiceDesignator in the config referenced the entrypoint "Counter", but this class does not extend 'WorkerEntrypoint'. Attempts to call this entrypoint will fail at runtime, but historically this was not a startup-time error. Future versions of workerd may make this a startup-time error.
[[durable_objects.bindings]]
name = "COUNTER"
class_name = "Counter"

[[migrations]]
tag = "v1"
new_classes = [ "Counter" ]

index.tsx:

export { Counter } from './counter';

export default {
	async fetch(request: Request, env: any, ctx: ExecutionContext): Promise<Response> {
		return new Response('Hello World!');
	},
};

Can we get the example updated to meet the requirements of that warning?

Additional information

No response

@sinkingpoint sinkingpoint added content:edit Request for content edits documentation Documentation edits labels Feb 12, 2025
@github-actions github-actions bot added the product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ label Feb 12, 2025
@sinkingpoint sinkingpoint changed the title Durable Object Example Produces Error Durable Object Example Produces Warning Feb 12, 2025
@khattaksd
Copy link

also see cloudflare/workers-sdk#8113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/
Projects
None yet
Development

No branches or pull requests

5 participants