Tutorial needed for Durable Objects

Tutorial for Durable Objects
I have been experimenting a lot with CF workers for the last couple of months. Workers, wrangler, KV, are all ‘Up and running’.
The tutorials I find on the CF website (https://developers.cloudflare.com/workers/tutorials) are great!

But I cannot start with the new feature ‘Durable Objects’. I only got error messages.

For example:

wrangler generate my-app https://github.com/cloudflare/durable-objects-template
-->Git Error: failed to find branch `master`

Other expample:

wrangler publish --new-class Counter
--> error: Found argument '--new-class' which wasn't expected

Obviously, I do a lot of things the wrong way…

Does anybody know of a step-by-step tutorial to get me up-and-running with Durable Objects?
(https://developers.cloudflare.com/workers/learning/using-durable-objects does not work for me)

For the second error, try installing a newer version of wrangler:

1 Like

I updated wrangler already:

wrangler --version
-->wrangler 1.15.0

Yep, I meant an even newer version of wrangler

wrangler 1.15.0-custom-builds-rc.2


Thx! That did the trick!:

This one got me the latest (beta) version:

npm uninstall -g @cloudflare/wrangler && npm install -g @cloudflare/[email protected]

This one is working:

wrangler generate my-workertest https://github.com/cloudflare/durable-objects-webpack-commonjs

(the other github template, mentioned above is still not working, same error)
And after changing my account-id in the wrangler.toml file I could publish with:

wrangler publish --new-class Counter

The branch name for this repo has been updated, and should work with wrangler generate at this point.