Taha✨🤓✨
CDCloudflare Developers
•Created by Taha✨🤓✨ on 10/31/2023 in #pages-help
Can't access KV namespace in local dev [VITE]
I'm pretty sure I'm entering the build command wrong. This will build the project just fine:
npx wrangler pages dev -- npm run dev
But I can't figure out where to put kv=KV_NAMESPACE
npx wrangler pages dev -- kv=KV_NAMESPACE npm run dev
is wrong
npx wrangler pages dev -- npm run dev kv=KV_NAMESPACE
is also wrong
npx wrangler pages dev -- npm run dev -- kv=KV_NAMESPACE
also seems to be wrong
I tried to follow what was suggested in these two pages.
https://developers.cloudflare.com/pages/platform/functions/local-development/#run-your-pages-project-locally
https://developers.cloudflare.com/pages/platform/functions/bindings/#interact-with-your-kv-namespaces-locally4 replies