Open dinkopehar opened 1 year ago
Thank you for reporting this,
I am going to work on this as well as other commands around products that previously required preview
tokens when in development local. The current Miniflare + Workerd have made this requirement obsolete in development local scenarios and shouldn't be erroring.
related internal ticket for same issue with R2: DEVX-773
Cc: @admah
A workaround may be to add the namespace as both id
and preview_id
.
{ binding = "TODO", id = "c71962cxxxx...", preview_id = "c71962cxxxx...", }
Can @dinko-pehar confirm ?
I had the same problem and adding both id
and preview_id
enables wrangler to run my app although I have not yet tested extensively to confirm correct behaviour.
Edit:
See https://github.com/cloudflare/workers-sdk/issues/3763#issuecomment-1688337394
Explains wrangler code can run:
So be aware id
= preview_id
is a hack and running local with --remote or --preview may affect your production KV store.
Which Cloudflare product(s) does this pertain to?
KV
What version(s) of the tool(s) are you using?
3.1.1 Wrangler ,
What version of Node are you using?
18.16.1
What operating system are you using?
WSL Ubuntu
Describe the Bug
Hello.
I'm using SvelteKit to bootstrap my app with Cloudflare Pages. I opened issue regarding why
platform
is not available . I wasn't sure how to test locally with bindings, such as KV, R2 etc. Since SvelteKit generated_worker.js
, I usedwrangler dev path/to/_worker.js
to run it.In my
wrangler.toml
, I have set:When I try to run it like this (KV "HELLO" exists), it states:
But when I create preview KV as suggested and add it to
wrangler.toml
, I get:This is what KV with preview outputs:
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response