Having issues with generating a local kv
# pages-help
b
I'm having issues generating a local kv, it's with remix so I have added the --kv into the package.json wrangler script. > cross-env NODE_ENV=development npm run wrangler --kv sessionStorage > wrangler > wrangler pages dev ./public "sessionStorage" When I go to access the KV its undefined. const handleRequest = createPagesFunctionHandler({ build, mode: process.env.NODE_ENV, getLoadContext: (context) => { console.log("Session Storage"); console.log(context.env); const sessionStorage = createWorkersKVSessionStorage({ kv: context.env.sessionStorage, cookie: sessionCookie, }) return { ...context.env, sessionStorage } }, });
h
Try
Copy code
sh
wrangler pages dev ./public --kv sessionStorage
b
Thanks, thought I could add --kv sessionStorage to the default dev:wrangler
it works now