Giter Site home page Giter Site logo

Comments (19)

niyarlatotep avatar niyarlatotep commented on May 25, 2024 3

Fixed by copying lib.deno.d.ts and lib.webworker.d.ts from

C:\Users\<User>\.vscode\extensions\denoland.vscode-deno-1.24.0\node_modules\typescript-deno-plugin\lib

to

C:\Users\<User>\AppData\Local\deno

Seems like extention wasn't able to copy it's dts files don't know why.

from vscode_deno.

niyarlatotep avatar niyarlatotep commented on May 25, 2024 3

@jbergant
as temporary fix you can try to copy
lib.deno.d.ts and lib.webworker.d.ts
from
~/.vscode/extensions/denoland.vscode-deno-1.24.0/node_modules/typescript-deno-plugin/lib
to
$HOME/Library/Caches/deno
as I mentioned before, but I'm not sure about Mac OS paths you can try. It worked for me on Windows

from vscode_deno.

jbergant avatar jbergant commented on May 25, 2024 3

Hi @buttercubz , @filburt-turle
finally, it's working for me. I downloaded lib.deno.d.ts file, then I restarted the typescript server, restarted mac and it worked!
Thanks for the tips :)

from vscode_deno.

kevinXmichael avatar kevinXmichael commented on May 25, 2024 3

Perhaps init deno will solve the problem: In vscode "show all commands" via CMD/CTRL + SHIFT + P and search for init deno, run it. Helped me to solve all problems with shown errors in vscode with deno.

from vscode_deno.

webpreneur avatar webpreneur commented on May 25, 2024 2

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:

cd <my-project>
touch tsconfig.json
mkdir lib
deno types > lib/deno_runtime.d.ts 

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 --config option to ensure it uses your tsconfig.json rather than it's own.

This worked for me. Cheers!

from vscode_deno.

buttercubz avatar buttercubz commented on May 25, 2024

check if you have this file deno.d.ts
in windows C:\Users\userhere.deno
in linux /Users/deno/.deno

from vscode_deno.

niyarlatotep avatar niyarlatotep commented on May 25, 2024

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!

from vscode_deno.

niyarlatotep avatar niyarlatotep commented on May 25, 2024

I placed deno.d.ts file into C:\Users\userhere.deno but no effects. It still doesn't work.

from vscode_deno.

chenguzhen87 avatar chenguzhen87 commented on May 25, 2024

you can reference #62

from vscode_deno.

zzhenryquezz avatar zzhenryquezz commented on May 25, 2024

same here the scripts run normal but the types are missing

from vscode_deno.

buttercubz avatar buttercubz commented on May 25, 2024

@niyarlatotep
try to have deno updated to the latest version it is currently 1.0.4.

use deno upgrade --version 1.0.4

from vscode_deno.

jbergant avatar jbergant commented on May 25, 2024

Hi,
I have version 1.0.4 of Deno. I'm using mac.

I installed and enabled the plugin: https://github.com/denoland/vscode_deno
Ts modules can be imported when the plugin is enabled.

But the Deno is not recognized.

I tried reinstalling the plugin.

In the settings I've added:
{
"deno.enable": true
}

I also tried:
{
"deno.enabled": true
}

I rebooted.

No luck.

There were no deno.d.ts installed anywhere. Do I need that file?

What else can I do?

from vscode_deno.

jbergant avatar jbergant commented on May 25, 2024

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'."

from vscode_deno.

buttercubz avatar buttercubz commented on May 25, 2024

@jbergant you can download lib.deno.d.ts file in this link from latest release.

this file contain all type definitions for Deno namespaces

from vscode_deno.

filburt-turle avatar filburt-turle commented on May 25, 2024

@buttercubz I just downloaded the latest Deno and I'm having the same problems as @jbergant, vscode is not picking up the Deno and it's not showing the methods...

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.

from vscode_deno.

buttercubz avatar buttercubz commented on May 25, 2024

@filburt-turle try to restart typescript server in vscode or reinstall vscode_deno plugin

from vscode_deno.

followben avatar followben commented on May 25, 2024

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:

cd <my-project>
touch tsconfig.json
mkdir lib
deno types > lib/deno_runtime.d.ts 

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 --config option to ensure it uses your tsconfig.json rather than it's own.

from vscode_deno.

adamledwards avatar adamledwards commented on May 25, 2024

@niyarlatotep solution worked for me.
Thank you

from vscode_deno.

k3v3n avatar k3v3n commented on May 25, 2024

It turns out that the issue was resolved by opening the command palette and running the Deno Init command on the bottom right.

Screen Shot 2020-12-15 at 8 07 52 AM

from vscode_deno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.