sveltejs/language-tools

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

Aperta

#1018 aperta il 22 mag 2021

 (0 commenti) (4 reazioni) (0 assegnatari)TypeScript (247 fork)auto 404
bughelp wanted

Metriche repository

Star
 (1437 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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

Guida contributor