Loren
04/01/2021, 1:44 PMRawn
04/01/2021, 1:58 PMGreg Brimble | Cloudflare Pages
04/01/2021, 2:04 PMAlexRobinson
04/01/2021, 2:06 PMRawn
04/01/2021, 2:06 PMRawn
04/01/2021, 2:07 PMwrangler publish --new-class Counter
it answers with: Cannot create binding for class Counter that does not currently implements durable objects. Did you mean to apply a --new-class migration to it?"
Greg Brimble | Cloudflare Pages
04/01/2021, 2:09 PMGreg Brimble | Cloudflare Pages
04/01/2021, 2:10 PMRawn
04/01/2021, 2:12 PMAlexRobinson
04/01/2021, 2:13 PMAlexRobinson
04/01/2021, 2:14 PM--new-class
are supported when doing a typescript build, but they're definitely not supported if you're on a build prior to v1.15.0-custom-builds-rc.1 (and you should really grab v1.15.0-custom-builds-rc.2 while you're at it)Rawn
04/01/2021, 2:16 PMwrangler 1.15.0-custom-builds-rc.2
Greg Brimble | Cloudflare Pages
04/01/2021, 2:16 PMGreg Brimble | Cloudflare Pages
04/01/2021, 2:17 PM--new-class
working?AlexRobinson
04/01/2021, 2:17 PMRawn
04/01/2021, 2:20 PMRawn
04/01/2021, 2:22 PMconstructor(state: DurableObjectState, env: any)
, but as you can see, I didn't find the type for env
in the @cloudflare/workers-types/index.d.ts
?Greg Brimble | Cloudflare Pages
04/01/2021, 2:25 PMGreg Brimble | Cloudflare Pages
04/01/2021, 2:25 PMGreg Brimble | Cloudflare Pages
04/01/2021, 2:25 PMmatt
04/01/2021, 2:27 PMwrangler.toml
under the [durable_objects]
section, you need to remove the binding if you are deleting the class it binds to (whoops, looks like alex answered already)Rawn
04/01/2021, 2:29 PMmatt
04/01/2021, 2:30 PMtype = "javascript"
and a [build]
section like the provided templates have with your typescript setup?Rawn
04/01/2021, 2:31 PMmatt
04/01/2021, 2:31 PMRawn
04/01/2021, 2:32 PMKat
04/01/2021, 2:32 PMRawn
04/01/2021, 2:33 PMGreg Brimble | Cloudflare Pages
04/01/2021, 2:33 PMmatt
04/01/2021, 2:36 PM