denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
94.66k stars 5.25k forks source link

Deno.openKv is not a function #25638

Closed Katze719 closed 3 weeks ago

Katze719 commented 3 weeks ago

Version: deno 2.0.0-rc.2 (release candidate, release, x86_64-unknown-linux-gnu) v8 12.9.202.13-rusty typescript 5.5.2

using deno via docker container denoland/deno:latest

when i try to use Deno.openKv() it will spit out this error message:

error: Uncaught (in promise) TypeError: Deno.openKv is not a function
const kv = await Deno.openKv()

is /// <reference lib="deno.unstable" /> still required?

marvinhagemeister commented 3 weeks ago

Add the --unstable-kv flag to your command like:

deno run --unstable-kv my-script.ts