-
-
Notifications
You must be signed in to change notification settings - Fork 54
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 when importing Svelte components in a .astro page (File 'Path/Component.svelte.tsx' is not a module) #652
Comments
Has anyone found a workaround for this? I would really like to use Astro with Svelte |
I tried this with yarn. bun and pnpm. There's no issue with pnpm |
Very interesting. I hope it will help investigate the issue. |
Typically it's |
Sorry about the delay, I got pulled into other things. In the reproduction, the issue is that As such, running |
I am newly running into this exact same error, when running Issue seems to be related to recent realease of
As a temporary fix I was able to resolve by modifying my package.json as below: {
"dependencies": {
- "@astrojs/check": "0.5.1",
+ "@astrojs/check": "0.4.1",
},
+ "pnpm": {
+ "overrides": {
+ "@astrojs/language-server": "2.6.2"
+ }
},
} |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Here is a public repo with a fresh Astro 3.1.0 + Svelte, Vue and React integrations:
Repo to reproduce the issue
When importing a Svelte component in a .astro page, I have an error saying: File 'Path/Component.svelte.tsx' is not a module. And I don't have any intellisense for the available props.
The components work as expected though.
I have no issue with Vue or React components.
Everything is working in Astro 2.0, so it seems to be an Astro 3.0 regression.
Maybe it's only a Astro language-tools issue.
It's not related to my vscode settings as I still get the error when reverting back to the default settings.
Here is a screenshot of my error in vscode:
What's the expected result?
I would expect to have no error and working intellisense for props.
Link to Minimal Reproducible Example
https://github.com/marcfilleul/astro-3
Participation
The text was updated successfully, but these errors were encountered: