Cannot access Cloudflare bindings (env) – always undefined with vite-plugin-cloudflare & nitro-cloudflare-dev #4008
akawahuynh
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on integrating Cloudflare D1 with a frontend app using TanStack Start, and trying to run API routes (Cloudflare Pages Functions style) locally with vite-plugin-cloudflare and nitro-cloudflare-dev.
However, env (which should include D1 bindings) is always undefined, both locally and in preview builds.
Guidance on whether this setup is supported
If vite-plugin-cloudflare supports Pages bindings like env.DB
Or if there's a better way to emulate full env bindings locally
Thanks a ton in advance! Appreciate all the work you’re doing in both projects
Beta Was this translation helpful? Give feedback.
All reactions