Err: No event handlers were registered. This script does nothing. When trying to add a DO
Hello! CF newbie here. I have a Workers project that is working successfully. I'm trying to add a durable object but when I try to publish the project with the new DO I get the following error:
The error is response to the following command:
My
The directory structure is as follows:
My worker.mjs file:
My ChessGame.js file:
My package.json file is as follows:
`
Interestingly enough, this is the first issue listed under the Common errors section on the CF dev docs(https://developers.cloudflare.com/workers/learning/using-durable-objects/#error-no-event-handlers-were-registered-this-script-does-nothing) but despite following the advice I'm still getting the same error.
Any help would be greatly appreciated! Thank you for building a great product (:
No event handlers were registered. This script does nothing.
[code: 10021]The error is response to the following command:
npm run deploy --new-class ./src/ChessGame.mjsMy
wrangler.toml file is as follows: The directory structure is as follows:
My worker.mjs file:
My ChessGame.js file:
My package.json file is as follows:
`
Interestingly enough, this is the first issue listed under the Common errors section on the CF dev docs(https://developers.cloudflare.com/workers/learning/using-durable-objects/#error-no-event-handlers-were-registered-this-script-does-nothing) but despite following the advice I'm still getting the same error.
Any help would be greatly appreciated! Thank you for building a great product (:
Durable Objects provide low-latency coordination and consistent permanent storage for the Workers platform through two features: global uniqueness and …
