Skip to content

[minor] (!) Plugin typescript: @rollup/plugin-typescript TS2307: Cannot find module './App.svelte' or its corresponding type declarations. src\main.ts: (1:17) 1 import App from './App.svelte'; #6939

@Bradley-H

Description

@Bradley-H

Describe the bug

When I enable typescript to Svelte Project (not sveltekit)

I get this error

(!) Plugin typescript: @rollup/plugin-typescript TS2307: Cannot find module './App.svelte' or its corresponding type declarations. src\main.ts: (1:17) 1 import App from './App.svelte'; 

I've not modified my Main.ts file

import App from './App.svelte'; const app = new App({	target: document.body,	props: {	name: 'world'	} }); export default app; 

This doesn't prevent it from running, but I'd, ideally like to have my console without errors.

I do have my typescript definition file in my src folder. At first, I thought maybe I should include a .nvmrc file with the recent version, but didn't work. used npm update. That didn't work. So, I imagine this is outside my understanding.

Reproduction

npm run dev

Logs

No response

System Info

System: OS: Windows 10 10.0.19043 CPU: (12) x64 Intel(R) Core(TM) i5-10500H CPU @ 2.50GHz Memory: 8.58 GB / 15.78 GB Binaries: Node: 16.13.0 - C:\Program Files\nodejs\node.EXE npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.53) Internet Explorer: 11.0.19041.1202 npmPackages: rollup: ^2.3.4 => 2.60.0 svelte: ^3.0.0 => 3.44.1

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions