You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling a script that uses DenoKv, it fails to persist data.
This can be fixed by supplying a path to Deno.openKv, which is bad since i need to change my script for the environment it would run in (deno run and deno deploy vs deno compile).
constkv=awaitDeno.openKv();// setting a persistant path, will store the dataconstkey=["device","key"];awaitkv.set(key,"hi deno team.");kv.close();constkv2=awaitDeno.openKv();// setting a persistant path here, will read the dataconst{value}=awaitkv2.get(key);console.log(value);// Expected Output: hi deno team.kv2.close();
Works fine
deno run --allow-all --unstable-kv main.ts
Does not work
deno compile --allow-all --unstable-kv -o main main.ts
./main
Version: Deno 1.44.4 (release, x86_64-pc-windows-msvc) (same behaviour on Linux)
v8 12.6.228.9
typescript 5.4.5
When compiling a script that uses DenoKv, it fails to persist data.
This can be fixed by supplying a path to Deno.openKv, which is bad since i need to change my script for the environment it would run in (deno run and deno deploy vs deno compile).
There might be similar issues, see:
#10693
minimal reproducible example:
Works fine
Does not work
This is a bug, since from the
Deno.openKv()
I would assume that it would work without a path.See: https://deno.land/api@v1.44.4?s=Deno.openKv
I also tried setting
--location
on deno compile, but same issue.The text was updated successfully, but these errors were encountered: