Nuxt + KV on local development

Hi. I have built a Nuxt3 application, and successfully deployed it to Cloudflare Pages, with Cloudflare KV, all working fine, able to read / write to CF KV.

BUT, I cannot figure out how to debug it locally on my local machine.

I am currently using npm run dev to run development locally, while in the package.json file, I have this line specified:

"dev": "nuxt dev --remote",

to deploy the Nuxt3 app, this is how I do it:

npx nuxi build --preset=cloudflare_pages
npx wrangler pages deploy dist

Can anyone help me to enable CF KV binding while I am developing locally? i.e. having my Nuxt3 app running on my machine, while able to read / write CF KV from Cloudflare

Appreciate your help on this.

You can use and Nuxt3 devtools to debug D1, R2 and KV.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.