-
-
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
🐛 BUG: astro check cannot parse file #870
Comments
I'm having the same issue, but not when running A video is attached. Screencast.from.2024-05-31.14-24-55.mp4 |
In the file in the OP, the issue is that the closing tag on line 16 has an extra space: <a class:list={
['col-start-1 border-2 hover:border-primary-accent border-primary-alternative flex items-center',
' justify-center size-8 rounded-full', {'hidden': !prev}]
- } href={prev}> <span class="i-mdi-arrow-left"> </ span>
+ } href={prev}> <span class="i-mdi-arrow-left"> </span>
</a> Upstream issue: withastro/compiler#1007 |
My code doesn't contain any whitespace in closing tags, so I'll investigate further. |
Describe the Bug
error astro(1000): The Astro compiler encountered an unknown error while transform this file to TSX. Please create an issue with your code and the error shown in the server's logs: https://github.com/withastro/language-tools/issues
WORKING Pagination.astro
Steps to Reproduce
The Astro JSX compiler has a problem parsing this file.
Only effects Astro check, astro build is fine and the generated files seem to be working just fine....
FAILING Pagination.astro
`panic: runtime error: index out of range [0] with length 0
goroutine 6 [running]:
github.com/withastro/compiler/internal/printer.renderTsx(0x1413950, 0x15623c0)
github.com/withastro/compiler/internal/printer/print-to-tsx.go:248 +0x1b6
github.com/withastro/compiler/internal/printer.renderTsx(0x1413950, 0x1562140)
github.com/withastro/compiler/internal/printer/print-to-tsx.go:523 +0x52f
github.com/withastro/compiler/internal/printer.renderTsx(0x1413950, 0x14c9e00)
github.com/withastro/compiler/internal/printer/print-to-tsx.go:523 +0x52f
github.com/withastro/compiler/internal/printer.renderTsx(0x1413950, 0x14c9b80)
github.com/withastro/compiler/internal/printer/print-to-tsx.go:523 +0x52f
github.com/withastro/compiler/internal/printer.renderTsx(0x1413950, 0x14c9900)
github.com/withastro/compiler/internal/printer/print-to-tsx.go:523 +0x52f
github.com/withastro/compiler/internal/printer.renderTsx(0x1413950, 0x14c9540)
github.com/withastro/compiler/internal/printer/print-to-tsx.go:147 +0xba
github.com/withastro/compiler/internal/printer.PrintToTSX({0x152b200, 0x409}, 0x14c9540, {{0x3c3c4, 0x6}, {0x145c6e0, 0x42}, {0x145c6e0, 0x42}, {0x46f38, ...}, ...}, ...)
github.com/withastro/compiler/internal/printer/print-to-tsx.go:30 +0x12
main.main.ConvertToTSX.func3({{}, 0x7ff800010000004b, 0x140c500}, {0x1434200, 0x2, 0x2})
./astro-wasm.go:263 +0xe
syscall/js.handleEvent()
syscall/js/func.go:100 +0x23
exit code: 2
There was an error transforming d:/Github/astro-reisinger.pictures/src/components/Pagination.astro to TSX. An empty file will be returned instead. Please create an issue: https://github.com/withastro/language-tools/issues
Error: TypeError: Cannot read properties of undefined (reading 'map').
D:\Github\astro-reisinger.pictures\node_modules@astrojs\compiler\dist\node\sync.cjs:1
`
"astro": "^4.8.3"
The text was updated successfully, but these errors were encountered: