Nuxt cloudflare pages, how to use KV bindings?

Does anybody have any more guidance on how to use KV within Cloudflare pages?

Following the deployment guide for nuxt, Cloudflare is undefined on the context object

https://developers.cloudflare.com/pages/framework-guides/deploy-a-nuxt-site/#use-bindings-in-your-nuxt-application

Thanks

I have the same issue. My bindings work locally when running wrangler pages dev but are undefined on the production environment, so wrangler pages publish. Does anyone know how to make them available on prod?

I found the answer. The KV namespace has to be added to the Application in Cloudflare dashboard under Settings => Functions => KV namespace bindings. It isn’t explained anywhere.

I believe it is explained in this documentation