Skip to content
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

TS errors shown even when Deno language server is enabled #715

Closed
khaosdoctor opened this issue Sep 15, 2022 · 2 comments
Closed

TS errors shown even when Deno language server is enabled #715

khaosdoctor opened this issue Sep 15, 2022 · 2 comments

Comments

@khaosdoctor
Copy link

khaosdoctor commented Sep 15, 2022

Describe the bug

VScode shows TS errors even with Deno enabled, it seems like the extension was never enabled

To Reproduce

  1. Create a new directory, enter it with VSCode
  2. Run "Deno: Initialize workspace" command
  3. Create a mod.ts file and add import { serve } from 'https://deno.land/std/http/server.ts'

You'll see a TS 2691 error: An import path cannot end with a '.ts' extension. Consider importing 'https://deno.land/std/http/server' instead.ts(2691).

The same also happens with the Deno workspace.

Language Server logs:

Starting Deno language server...
  version: 1.24.1 (release, aarch64-apple-darwin)
  executable: /.asdf/installs/deno/1.24.1/bin/deno
Connected to "Visual Studio Code" 1.71.2
  Auto-resolved configuration file: "file:///Repositories/github.com/khaosdoctor/gh-telegram-bot/deno.json"
Setting import map from configuration file: "./import-map.json"
  Resolved import map: "/Repositories/github.com/khaosdoctor/gh-telegram-bot/import-map.json"
Enabling import suggestions for: https://deno.land
Enabling import suggestions for: https://crux.land
Enabling import suggestions for: https://x.nest.land
Download https://x.nest.land/.well-known/deno-import-intellisense.json
Download https://intellisense.nest.land/deno-import-intellisense.json
Server ready.

Expected behavior

No errors shown.

Screenshots

image
image
image
image

Versions

vscode: 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7) ARM64
deno: 1.24.1
extension: 3.13.1

@kitsonk
Copy link
Contributor

kitsonk commented Sep 15, 2022

Do you have TypeScript's enableProjectDiagnostics enabled for the user?

@khaosdoctor
Copy link
Author

Yes I had! Thanks a lot, this solved the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants