Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Environment kv_namespaces not being parsed into the config #1408

Closed
rdaniels6813 opened this issue Jun 24, 2020 · 1 comment · Fixed by #1409
Closed

Environment kv_namespaces not being parsed into the config #1408

rdaniels6813 opened this issue Jun 24, 2020 · 1 comment · Fixed by #1409

Comments

@rdaniels6813
Copy link

🐛 Bug Report

Following docs online to use environments with kv_namespaces specified does not bind the namespace during deployment.

This issue does not occur if you use kv-namspaces with a hyphen instead of an underscore under the environments, but this is not how it is shown in the examples and involved me looking at the codebase to discover this.

Environment

  • operating system: MacOS & Linux
  • output of rustc -V: rustc 1.44.1 (c7087fe00 2020-06-17)
  • output of node -v: v10.16.3
  • output of wrangler -V: 👷 ✨ wrangler 1.10.1
  • contents of wrangler.toml:
name = "hello-world-worker"
type = "webpack"
account_id = ""
workers_dev = true
webpack_config = "webpack.config.js"
kv_namespaces = [
  { binding = "KV_STUFF_HERE", id = "", preview_id = "" },
]

[env.production]
name = "hello-world-worker-production"
kv_namespaces = [
  { binding = "KV_STUFF_HERE", id = "", preview_id = "" },
]

Steps to reproduce

wrangler publish --env production

What did you expect to see?

Bindings created for the KV to the worker in the CloudFlare console

What did you see instead?

No bindings created

@EverlastingBugstopper
Copy link
Contributor

great catch @rdaniels6813 - got a PR up for that, should be able to get it in the next release. Like you said, if you use kv-namespaces instead of what's documented it should work for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants