Skip to content
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: #869

Closed
DanielTate opened this issue Sep 26, 2023 · 1 comment
Closed

🐛 BUG: #869

DanielTate opened this issue Sep 26, 2023 · 1 comment
Labels
needs triage Issue needs to be triaged

Comments

@DanielTate
Copy link

DanielTate commented Sep 26, 2023

What version of @astrojs/compiler are you using?

2.1.0

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

Running npm run dev crashes

goroutine 32 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x6
github.com/withastro/compiler/internal_wasm/utils.ErrorToJSError(0x47a900, {0x1812318, 0x648a08})
	github.com/withastro/compiler/internal_wasm/utils/utils.go:68 +0x2
main.Transform.func1.1.1.1()
	./astro-wasm.go:290 +0x5
panic({0x2db80, 0x648a08})
	runtime/panic.go:884 +0x29
github.com/withastro/compiler/internal/sourcemap.(*ChunkBuilder).AddSourceMapping(0x755800, {0x770}, {0x75a000, 0xc4b, 0x1000})
	github.com/withastro/compiler/internal/sourcemap/sourcemap.go:678 +0x1e
github.com/withastro/compiler/internal/printer.(*printer).addSourceMapping(0x755738, {0x770})
	github.com/withastro/compiler/internal/printer/printer.go:447 +0x9
github.com/withastro/compiler/internal/printer.(*printer).printTextWithSourcemap(0x755738, {0x5650b0, 0x2b}, {0x758})
	github.com/withastro/compiler/internal/printer/printer.go:80 +0xf
github.com/withastro/compiler/internal/printer.render1(0x755738, 0x668a00, {0x0, 0x0, 0x6, 0x0, {{0x791ff8, 0x8}, {0x7e3d00, 0x32}, ...}, ...})
	github.com/withastro/compiler/internal/printer/print-to-js.go:283 +0x77
github.com/withastro/compiler/internal/printer.render1(0x755738, 0x6688c0, {0x0, 0x0, 0x5, 0x0, {{0x791ff8, 0x8}, {0x7e3d00, 0x32}, ...}, ...})
	github.com/withastro/compiler/internal/printer/print-to-js.go:704 +0x544
github.com/withastro/compiler/internal/printer.render1(0x755738, 0x668640, {0x0, 0x0, 0x4, 0x0, {{0x791ff8, 0x8}, {0x7e3d00, 0x32}, ...}, ...})
	github.com/withastro/compiler/internal/printer/print-to-js.go:652 +0x437
github.com/withastro/compiler/internal/printer.render1(0x755738, 0x6683c0, {0x0, 0x0, 0x3, 0x0, {{0x791ff8, 0x8}, {0x7e3d00, 0x32}, ...}, ...})
	github.com/withastro/compiler/internal/printer/print-to-js.go:652 +0x437
github.com/withastro/compiler/internal/printer.render1(0x755738, 0x668140, {0x0, 0x0, 0x2, 0x0, {{0x791ff8, 0x8}, {0x7e3d00, 0x32}, ...}, ...})
	github.com/withastro/compiler/internal/printer/print-to-js.go:652 +0x437
github.com/withastro/compiler/internal/printer.render1(0x755738, 0x5c8500, {0x0, 0x0, 0x1, 0x0, {{0x791ff8, 0x8}, {0x7e3d00, 0x32}, ...}, ...})
	github.com/withastro/compiler/internal/printer/print-to-js.go:652 +0x437
github.com/withastro/compiler/internal/printer.render1(0x755738, 0x5c8140, {0x1, 0x0, 0x0, 0x0, {{0x791ff8, 0x8}, {0x7e3d00, 0x32}, ...}, ...})
	github.com/withastro/compiler/internal/printer/print-to-js.go:125 +0xc6
github.com/withastro/compiler/internal/printer.printToJs(0x755738, 0x5c8140, 0x0, {{0x791ff8, 0x8}, {0x7e3d00, 0x32}, {0x648750, 0x14}, {0x648780, ...}, ...})
	github.com/withastro/compiler/internal/printer/print-to-js.go:72 +0x3
github.com/withastro/compiler/internal/printer.PrintToJS({0x4f9500, 0x9fe}, 0x5c8140, 0x0, {{0x791ff8, 0x8}, {0x7e3d00, 0x32}, {0x648750, 0x14}, ...}, ...)
	github.com/withastro/compiler/internal/printer/print-to-js.go:53 +0xc
main.Transform.func1.1.1()
	./astro-wasm.go:407 +0x38
created by main.Transform.func1.1
	./astro-wasm.go:286 +0x14

I'm not putting my whole project in and example... Is there any way you can derive information from the stack trace?

I removed one of my components that uses fragments to inject HTML into another component.

I think what happened was I used the copy feature from figma and some whitespace char or not allowed char was included in the copy but wasn't showing in my editor. Might be worth looking into, I might dig into it if I get some time.

Link to Minimal Reproducible Example

https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics?file=README.md&on=stackblitz

@Princesseuh Princesseuh added the needs triage Issue needs to be triaged label Nov 12, 2023
@MoustaphaDev
Copy link
Member

This was fixed in #902!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants