Anyone know why I can't access my local KV? Start Command ```wrangler pages dev --kv=MY_KV --compat

Anyone know why I can't access my local KV?
Start Command
wrangler pages dev --kv=MY_KV --compatibility-date=2023-10-30 --proxy 3000 -- npm run dev

Function
export default defineEventHandler(({ context }) => {
  return context;
});

Context
{
  "_nitro": {
    "routeRules": {}
  },
  "nitro": {
    "errors": []
  },
  "matchedRoute": {
    "path": "/api/hello",
    "handlers": {}
  },
  "params": {}
}

It's nuxt. And if I try to access it like in the Docs context.cloudflare.env.MY_KV; I get cloudflare isn't defined

Error
[proxy]: [nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading 'env')
image.png
Was this page helpful?