You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this issue only occurs in one browser, which browser is a problem?
vscode
Describe the Bug
The following typescript error when importing svelte components into astro files:
File '.../astro/src/components/MyComponent.svelte.tsx' is not a module.
Is the `@astrojs/svelte` package installed? You can add it to your project by running the following command: `astro add svelte`. If already installed, restarting the language server might be necessary in order for the change to take effect.ts(230
I'm using a multi-repo setup where I have the root, and within this root are 2 folder, of which one is 'astro'. When opening the astro folder itself, the errors disappear.
When using yarn workspaces the problem disappeard, but I need the node_modules to be installed in the astro folder itself
What's the expected result?
Typescript to recognize the fact that @astrojs/svelte is installed.
Link to Minimal Reproducible Example
Can't because its a vscode error
Participation
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
I'm getting the same thing in my project and it is not a multi repo project. Its occurring in the /src/pages/homebrew/[slug].astro file when trying to import $/components/SlideOutPanel.svelte, I am using the paths field in tsconfig for that aliasing, and the error still occurred for me even if I switched to a regular relative path import. I am using bun as the package manager, but I have tried to switching to yarn and the error did not go away.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
vscode
Describe the Bug
The following typescript error when importing svelte components into astro files:
I'm using a multi-repo setup where I have the root, and within this root are 2 folder, of which one is 'astro'. When opening the astro folder itself, the errors disappear.
When using yarn workspaces the problem disappeard, but I need the node_modules to be installed in the astro folder itself
What's the expected result?
Typescript to recognize the fact that @astrojs/svelte is installed.
Link to Minimal Reproducible Example
Can't because its a vscode error
Participation
The text was updated successfully, but these errors were encountered: