Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vercel KV returns null on start of dev server in Nextjs #781

Open
iShibi opened this issue Oct 19, 2024 · 0 comments
Open

Vercel KV returns null on start of dev server in Nextjs #781

iShibi opened this issue Oct 19, 2024 · 0 comments

Comments

@iShibi
Copy link

iShibi commented Oct 19, 2024

I'm using Vercel KV in my Nextjs app. Despite the key being available in the storage, I've noticed that 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 the first try, fetches correct data afterwards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant