Skip to content

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

Open
@ochmanski

Description

@ochmanski

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:
Screenshot 2021-05-22 at 22 39 14

Workaround:
Screenshot 2021-05-22 at 22 42 59

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions