🐛 BUG: `wrangler dev -l` doesn't use preview KV namespace
See original GitHub issueWhat version of Wrangler
are you using?
2.0.22
What operating system are you using?
Mac
Describe the Bug
When running wrangler dev -l
the KV store for a namespace will remain empty, despite data being present (added via wrangler kv:key put --binding=domains --preview true "key" "value"
). Running wrangler kv:key list --binding=domains --preview true
does return the key, however listing the keys from within the worker, or attempting to retrieve the key returns nothing.
wrangler lists the preview namespace id as an available binding when starting.
Turning off local mode restores expected functionality, and uses the preview namespace as expected, so it appears to be only a problem when running with the -l
flag.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Cloudflare KV namespace doesn't bind - Stack Overflow
wrangler complains if there is no preview KV, so create them both. Next, create a kv_namespaces array entry and duplicate the preview_id in...
Read more >How to do KV binding in wrangler.toml - Cloudflare Community
Add preview_id in the KV namespace, it's there so you can use a different namespace for prod and dev.
Read more >AkI - River Thames Conditions - Environment Agency - GOV.UK
Modern drive in movie theater, Upr mayaguez ciencias sociales, L intranquille pontarlier. Vasco 2 x 2 cruzeiro 2000, Baksteenkoe?
Read more >set node_options=--openssl-legacy-provider - You.com | The search ...
if using bash just run NODE_OPTIONS=--openssl-legacy-provider before any ... Describe the bug. wrangler dev and wrangler preview fail to run with error ......
Read more >Building a Like Button with Cloudflare Workers
Give the namespace a name, in this case, likes and click, Add . You now have a KV store set up, you can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is exactly what I thought after I updated my project from 0.0.19 to 2.0.24.
Wrangler was implicitly reading KVs from
.mf/
folder that I was generating using Miniflare. But after the update, it was no longer the case. Cloudflare doc didn’t mention anything about the ephemeral nature of--local
flag in pages dev command, which is set to true by default.A single mention of
--experimental-enable-local-persistence
flag withwrangler-local-state
folder could have saved much time.@penalosa Correct it is, I should be more clear which documentation next time. This is looking good, the technical writer team will follow up on the PR you make too.