-
Notifications
You must be signed in to change notification settings - Fork 144
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
Why vs code doesn't show types for Deno #74
Comments
check if you have this file deno.d.ts |
There is only bin folder there which contains of deno.zip that's all. I used chcolatelly for install and I have Windows 8.1 is it an install error propably? Will try to place this file, thank you! |
I placed deno.d.ts file into C:\Users\userhere.deno but no effects. It still doesn't work. |
you can reference #62 |
Fixed by copying lib.deno.d.ts and lib.webworker.d.ts from
to
Seems like extention wasn't able to copy it's dts files don't know why. |
same here the scripts run normal but the types are missing |
@niyarlatotep use deno upgrade --version 1.0.4 |
Hi, I installed and enabled the plugin: https://github.com/denoland/vscode_deno But the Deno is not recognized. I tried reinstalling the plugin. In the settings I've added: I also tried: I rebooted. No luck. There were no deno.d.ts installed anywhere. Do I need that file? What else can I do? |
@jbergant |
Hi @niyarlatotep, these two files were not installed on the mac during the installation. After restarting my computer a few times, I can now run deno scripts in the terminal with no problem. The problem any remains in the IDE where I get the error: "Cannot find name 'Deno'." |
@jbergant you can download lib.deno.d.ts file in this link from latest release. this file contain all type definitions for Deno namespaces |
@buttercubz I just downloaded the latest Deno and I'm having the same problems as @jbergant, vscode is not picking up the I'm running Version: 1.46.0-insider Is there a manual way to get this working? 🦕 ~/D/deno ➜ find ./ -name lib.webworker.d.ts master
🦕 ~/D/deno ➜ find ./ -name lib.deno.d.ts master Those files don't actually exist. |
@filburt-turle try to restart typescript server in vscode or reinstall vscode_deno plugin |
Hi @buttercubz , @filburt-turle |
I'm running VS Code 1.45.1 on macOS Catalina 10.15.4 using deno: 1.0.5, VS Code's own typescript server at 3.9.2 and v1.24.0 of the official denoland.vscode-deno plugin and I'm having the same problem. I tried all the suggestions on this thread including re-downloading the latest lib.deno.d.ts into ~/.vscode/extensions/denoland.vscode-deno-1.24.0/node_modules/typescript-deno-plugin/lib/, restarting the typescript server and rebooting my Mac... to no avail. However I did find a workaround thanks to this helpful StackOverflow answer. In short:
Even if tsconfig.json is empty, it seems VS Code will automatically include deno_runtime.d.ts. Of course if you put anything else in there, you'll want to invoke deno with the |
@niyarlatotep solution worked for me. |
Fix wrong VS Code Extension ID. Explicitly `await` (and catch) `deno.generateDtsForDeno`, so all definition files are in place, before the extension finishes activation phase. fixes denoland#74, denoland#66, denoland#62, denoland#48
Perhaps |
This worked for me. Cheers! |
I've installed this plugin, but when I try to write code, for example:
vs code shows me an error:
Cannot find name 'Deno'.ts(2304)
I use built-in version of TypeScript. Do I need to download types somehow?
The text was updated successfully, but these errors were encountered: