#Property 'openKv' does not exist on type 'typeof Deno'. VSCode

50 messages · Page 1 of 1 (latest)

sweet sable
#

Such as the title say, I cant get the LSP to recognize openKv in the Deno namespace...

deno 1.32.5+78b630d (canary, x86_64-apple-darwin)
v8 11.2.214.15
typescript 5.0.3

Any idea ?

grizzled karma
#

do you have unstable enabled?

worthy finch
#

Same here

{
  "deno.enable": true,
  "deno.unstable": true
}
oak patio
#

I've notice that that is not enough. I have use the --unstable flag in the deno run cli command.

acoustic pasture
#

I can't access any unstable APIs in VSCode either. Even with the suggested .vscode/settings.json settings.

# deno --version
deno 1.33.1 (release, x86_64-pc-windows-msvc)
v8 11.4.183.1
typescript 5.0.3
acoustic pasture
acoustic pasture
#

I have unstable enabled in VSCode, but the same error is still there. @grizzled karma is it possible this is a Windows problem?

worthy notch
#

I'm experiencing the same thing but on mac os

oak patio
#

No issue here on Windows. try refreshing deno lsp by ctrl+shift+p then Deno: Initialize Workspace

#

I've used that in past to clear such issues.

worthy finch
oak patio
worthy finch
#

deno --version
deno 1.33.1 (release, aarch64-apple-darwin)
v8 11.4.183.1
typescript 5.0.3

worthy finch
oak patio
#

Are you sure deno is enabled in the project, It is not enough to just have the /.vscode/settings.json ,
you must open the Command Pallet (Ctrl+Shift+P),
and run the Deno: Initialize Workspace Configuration

If it is initialized, you should see Deno 1.33.1 at the far right bottom status-bar in VSCode.

worthy finch
oak patio
#

Can you run the code with deno run -A --unstable yourmodname.ts. ?

#

Sometimes a successful run will refresh the cache.

#

What is missing is lib.deno.unstable.d.ts

acoustic pasture
worthy finch
#

^ Tried the versions he mention. No difference. Tried a few more versions. Also tried uninstalling deno completely, verified VSCode could not find the binary. Then reinstalled but through homebrew this time. Issue persists 🤷‍♂️

worthy finch
worthy finch
oak patio
oak patio
worthy finch
#

Where is the cache?

acoustic pasture
#

Should we wait to roll forward?

worthy finch
#

I have the issue in every version of Deno I try. Just tried 1.21.0 even

#

Going to try different versions of the extension as well

worthy finch
#

Nothing so far. Going to run deno from source and check the logs to see when/if the unstable flag gets lost

worthy notch
#

It's quite strange, in one project I don't get this error and in another I do.

worthy finch
#

🤦‍♂️

worthy finch
#

now it works

worthy notch
#

weird, I’ll try that

worthy finch
#

Found the culprit

#

Commenting out this import solves the issue

#

I suppose it overrides the .d.ts

#

switched to import { serve } from "https://deno.land/[email protected]/http/server.ts"; instead.

acoustic pasture
#

I used code from the old Deno Deploy Discord Application Command tutorial which had Sift.

acoustic pasture
#

Deno.Kv + Discord Application Commands = ❤️

sweet sable
#

This is still not fixed on latest Canary version, the LSP randomly doesnt recognize OpenKV...

#

i was working with it without any problem all morning but now its gone

worthy notch
#

yeah not really sure what’s going on here