workers-sdk
workers-sdk copied to clipboard
🐛 BUG: Calling wrangler publish will remove KV bindings
What version of Wrangler are you using?
2.0.28
What operating system are you using?
Mac
Describe the Bug
(copied from https://github.com/cloudflare/wrangler/issues/2301)
🐛 Bug report
Describe the bug
On wrangler 2.0.28 (and possibly 2.0.26), after I call wrangler publish without a wrangler.toml file, my KV bindings are removed from my worker. My full publish command in case its relevant: wrangler publish dist/index.mjs --name auth --tsconfig ./tsconfig.json --latest
Reproduce the bug
wrangler loginwrangler init wrangTest --yescd wrangTest && rm wrangler.tomlwrangler publish src/index.ts --name wrangtest --latest- [Add KV binding to worker in dashboard. Name and which KV namespace does not matter]
- Run
wrangler publish src/index.ts --name wrangtest --latestagain - KV binding will be gone :-(
Expected behavior
Existing KV binding should not be removed on wrangler publish
Environment and versions
Fill out the following information about your environment.
- operating system: MacOS Monterey 12.5.1
- output of
wrangler -V: ⛅️ wrangler 2.0.28 - output of
node -v: v18.7.0 - content of
wrangler.toml: no wrangler.toml