Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could Not Find a Declaration File for Module when Importing Special Component in Svelte File #90

Open
KiddoV opened this issue Dec 8, 2023 · 2 comments

Comments

@KiddoV
Copy link

KiddoV commented Dec 8, 2023

TypeScript check keep giving me this error when I import special component like: IonTabs, IonNav, etc...

error

Everything seems to work "fine" (except ** This issue **).

My tsconfig:

{
	"extends": "./.svelte-kit/tsconfig.json",
	"compilerOptions": {
		"typeRoots": ["./node_modules"],
		"types": ["ionic-svelte"],
		"allowJs": true,
		"checkJs": true,
		"esModuleInterop": true,
		"forceConsistentCasingInFileNames": true,
		"resolveJsonModule": true,
		"skipLibCheck": true,
		"sourceMap": true,
		"strict": true,
		"moduleResolution": "bundler"
	}
	// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
	//
	// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
	// from the referenced tsconfig.json - TypeScript does not merge them in
}

When I import my own Svelte Component to another Svelte file, It doesn't seem to have this issue at all.

Is there anyway to get rid of this annoying error?
Thanks,

@Tommertom
Copy link
Owner

How did you create the app? Npm create ionic-svelte-app@latest?

Is the tsconfig the same as the one that you get out of the npm command?

@KiddoV
Copy link
Author

KiddoV commented Dec 10, 2023

Yes. I did use the npm command, and that config came with it, only has a little bit of editing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants