-
Notifications
You must be signed in to change notification settings - Fork 337
Improve "you must designate a preview_id for each KV namespace" error to direct users to a solution #1458
Comments
Sorry for barging here afterwards like this, but I opened a SO question about this very thing at https://stackoverflow.com/questions/63332306/what-are-cloudflare-kv-preview-ids-and-how-to-get-one. The problem is that it's not clear what these identifiers really are and how they relate to what gets deployed. It appears the official documentation at https://developers.cloudflare.com/workers/tooling/wrangler/configuration/#kv_namespaces. Could someone clarify here or in SO, please? :) |
I've answered on the SO post but I'll xpost here:
Yes! The reason there is a different identifier for preview namespaces is so that when developing with For your situation here there are actually a few things going on.
Workers Sites will automatically configure a production namespace for each environment you run |
Can this please be added to the docs in a more conspicuous/obvious way ? I mean the portion that implies that one should add the |
Thanks. It works I Run command with --preview.
|
💡 Feature request
With the introduction of preview namespaces, users may run
wrangler dev
orwrangler preview
and see an error likeError: In order to preview a worker with KV namespaces, you must designate a preview_id for each KV namespace you'd like to preview.
However, we've heard from users who weren't sure what to do next: how do you designate a
preview_id
for each KV namespace?We should try and see if there's an easy way to make that error message more instructive about how to solve the problem, by directing the user to add a preview id in wrangler.toml, or checking out the docs, or something else.
The text was updated successfully, but these errors were encountered: