coc-deno: [tsserver 2304] [E] Cannot find name 'Deno'.

After installing Deno and configuring CoC neovim is showing errors that “[tsserver 2304] [E] Cannot find name ‘Deno’.”

Although completions are working.

Deno tsserver

arch@9d46dd2d-1178-ce83-cbc4-d396e4a24060 ~/g/denolearning Γ¥»Γ¥»Γ¥» deno --version
deno 1.7.5 (release, x86_64-unknown-linux-gnu)
v8 9.0.123
typescript 4.1.4

arch@9d46dd2d-1178-ce83-cbc4-d396e4a24060 ~/g/denolearning Γ¥»Γ¥»Γ¥» cat ~/.config/nvim/coc-settings.json                                                                                                                                                                              Γ£ÿ 130
{
  "deno.enable": true,
  "deno.lint": true,
  "deno.unstable": true,
  "deno.config": "/home/arch/.tsconfig.json"
}

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 19 (8 by maintainers)

Most upvoted comments

@Classy-Bear @maheshsundaram

Is there a minimum reproducible procedure?

This is the procedure I tried, coc-deno has no problem and is behaving correctly.


  1. Preparation
mkdir -p /tmp/deno-check
cd /tmp/deno-check
nvim check.ts

The code is this one from the official manual. https://deno.land/manual@v1.9.0/getting_started/first_steps#making-an-http-request

  1. Run:CocCommand deno.initializeWorkspace and checked and <CR>.

DEMO

coc-deno-issue-ok1

@igorbrasileiro I don’t think we can use these extensions with coc-deno or Deno LSP, cause typescript-styled-plugin etc plugins can only work as TypeScript plugins with tsconfig.json.