We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is all fine and well, but is there in wrangler 3 a method yet to bind platform.env.DB while running in dev mode?
The text was updated successfully, but these errors were encountered:
@gerhardcit
npx wrangler pages dev --d1=DB -- npm run dev
Sorry, something went wrong.
seems like you haven't tried it.
start you app as indicated:
npx wrangler pages dev --d1=DB -- npm run dev the test the api curl http://127.0.0.1:8788/api/users
curl http://127.0.0.1:8788/api/users
you will get this
✘ [ERROR] [proxy]: TypeError: Cannot read properties of undefined (reading 'env') at GET (/svelte-demo-d1/src/routes/api/users/+server.ts:4:31)
this issue is mentioned here: https://kit.svelte.dev/docs/adapter-cloudflare#bindings-testing-locally
in wrangler v2 there were hacks with miniflare.. but since wrangler v3, I'm yet to find a real solution to develop sveltekit with bindings.
See #3 for a PR created as an option on how to handle local dev using wrangler-proxy
No branches or pull requests
This is all fine and well, but is there in wrangler 3 a method yet to bind platform.env.DB while running in dev mode?
The text was updated successfully, but these errors were encountered: