-
Notifications
You must be signed in to change notification settings - Fork 55
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 BUG: Compiler crashes with out of bound errors when an imported component is top level component. #807
Comments
You should use a |
Okay. Wasn't aware of |
I wasn't able to reproduce using the example in this issue, but I do see the problem in the reproduction. If you move the component inside of the ---
import Test from '../components/Test.astro';
---
<Test/>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>Astro</title>
</head>
<body>
<h1>Astro</h1>
</body>
</html> |
@natemoo-re Yeah, moving the component within the This could have happened with components too. May be not so priority as can't think of many common use cases, but still a good error message would help. |
came across this issue as well. Search keywords: for me, the issue was that I had html comment tags in my .astro files. Example: I just had to get rid of this and |
What version of
@astrojs/compiler
are you using?1.5.1
What package manager are you using?
pnpm
What operating system are you using?
Mac
Describe the Bug
Compiler crashes when importing a component. Happens when the imported component is the top level component.
No bug here as the imported component is not top level.
Bug here as the imported component is top level
Stacktrace
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-jnwbjw?file=src%2Fpages%2Findex.astro
The text was updated successfully, but these errors were encountered: