sveltejs/language-tools

Yarn 2 PnP error - Cannot find type definition file for 'svelte'

開放

#1,018 建立於 2021年5月22日

 (0 則留言) (4 個反應) (0 位負責人)TypeScript (247 個分叉)auto 404
bughelp wanted

倉庫指標

星標
 (1,437 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Describe the bug If .svelte file has no <script></script>, Svelte for VSCode reports Cannot find type definition file for 'svelte' error from js extension - see screenshot for more.

To Reproduce

  1. Clone https://github.com/ochmanski/sveltejs-language-tools-pnp-issue
  2. Go to src/routes/about.svelte to see the issue
  3. Go to src/routes/about-script-workaround.svelte to see how issue disappears when there's a script tag

Expected behaviour There should be no error. Sapper / Svelte compiles fine, run yarn dev to verify that.

Screenshots Issue:

Workaround:

System (please complete the following information):

  • OS: macOS
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode
  • Yarn version: 2.4.1
  • VSCode version: 1.56.2

貢獻者指南