-
Notifications
You must be signed in to change notification settings - Fork 150
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
Error with external Svelte 5 components #655
Comments
The problem is that You can fix this by changing your We should probably also search for a |
Hum... well in my case I already have a tsconfig.json. But the sveltekit project is in a subfolder (in a monorepo without a tsconfig at the root level). Would that trigger the same issue as well? I tried adding a tsconfig.json at the root of the repo, but I get the same issue. |
Does the SvelteKit project in which you have this error have a tsconfig.json? What happens if you set the tsconfigDirectory option? |
Yes it has. |
What error should I be expecting in that stackblitz example? The image loads up and there's no error in the Stackblitz console. |
Oh yeah you are right. I made other tests since the last comment. What you where seeing is when we use the preprocessor from @sveltejs/vite-plugin-svelte. I just modified back to using svelte-preprocess, you should see the error now. Thank you for your help. |
Describe the bug
Using svelte-preprocess with Svelte 5 and importing a Svelte 5 component from an npm package triggers an error:
'p' has already been declared
Detailed error with a random package
Same error occurs with bits-ui@next, svelte-clerk...
To Reproduce
I made a simple example here:
https://stackblitz.com/edit/sveltejs-kit-template-default-u71xqf?file=svelte.config.js
Is there a simple way to make it work?
Thank's for your help.
The text was updated successfully, but these errors were encountered: