Vercel KV returns null on startup everytime.
Unanswered
Chinese perch posted this in #help-forum
Chinese perchOP
I'm using Vercel KV in my Nextjs app. I've noticed that despite the key being available in the storage, the KV library returns
null
when I start the dev server. It returns correct data after that until I restart the server. When I restart, it again does the same thing. Here is the sample code:import { kv } from '@vercel/kv';
const accessTokenData = await kv.get('accessTokenData');
console.log(accessTokenData); // <--- null on first try, fetches correct data after that.