© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•2y ago•
1 reply
hfcRed

Cant deploy worker using router class

Hello, I am trying to deploy a worker that uses a custom router but wrangler keeps throwing the error
The uploaded script has no registered event handlers. [code: 10068]
The uploaded script has no registered event handlers. [code: 10068]


Which seems weird because the router has an
async fetch
async fetch
handler and is the default export. From everything I have read, this should work? Am I missing something?

I also tried extending the class using
WorkerEntrypoint
WorkerEntrypoint
but it results in the error
Uncaught TypeError: Failed to construct 'WorkerEntrypoint': constructor parameter 1 is not of type ExecutionContext'.
Uncaught TypeError: Failed to construct 'WorkerEntrypoint': constructor parameter 1 is not of type ExecutionContext'.
which is odd because looking at the docs examples, a constructor shouldnt be needed.
image.png
image.png
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Worker deploy issues?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
Cannot deploy Worker Assets
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
11mo ago
How to deploy worker?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Cant Preview Worker using queue in Pages functions
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
12mo ago