这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@iShibi

Description

@iShibi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions