Not sure if anyone has reported this,
Not sure if anyone has reported this, but when I run
wrangler types
to get my worker-configuration.d.ts, it contains 2 definitions for interface Cloudflare.Env with the second one being blank. This is causing my typescript to not see any of the properites in my Env.8 Replies
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
Yeah. Thinking it's not the cause now. I'm not really sure what's happening. I have my project set up just like the Cloudflare template for React Router 7.
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
Ah. I already did that because I got a warning from wrangler types when I was using that package
It didn't seem to make a difference.
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
I did notice at some point CloudflareBindings became Env in the worker-configuation.d.ts. I just updated may code.
Yeah. I can give it a try.
So that one uses a template from the remix repo. It doesn't use Hono for the worker, but the tsconfigs are set up the same.
It appears to be working.
Another difference between mine and the template project is that mine is running in a monorepo.
Okay. Finally got to the bottom of it. There was still @Cloudflare/workers-types in the node_modules that was messing things up.