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: panic: html: bad parser state: originalIM was set twice [recovered] panic: interface conversion: string is not error: missing method Error #1038

Open
lilith opened this issue Aug 5, 2024 · 2 comments
Labels
needs triage Issue needs to be triaged

Comments

@lilith
Copy link

lilith commented Aug 5, 2024

What version of @astrojs/compiler are you using?

2.10.1

What package manager are you using?

npm

What operating system are you using?

wsl2

Describe the Bug

`panic: html: bad parser state: originalIM was set twice [recovered]
        panic: interface conversion: string is not error: missing method Error

goroutine 8 [running]:
main.main.Transform.func1.1.1.1()
        ./astro-wasm.go:327 +0x5
panic({0x17900, 0x7b180})
        runtime/panic.go:770 +0x1a
github.com/withastro/compiler/internal.(*parser).setOriginalIM(...)
        github.com/withastro/compiler/internal/parser.go:544
github.com/withastro/compiler/internal.inBodyIM(0x14565a0)
        github.com/withastro/compiler/internal/parser.go:1105 +0x3f8
github.com/withastro/compiler/internal.(*parser).parseCurrentToken(0x14565a0)
        github.com/withastro/compiler/internal/parser.go:2981 +0x12
github.com/withastro/compiler/internal.(*parser).parse(0x14565a0)
        github.com/withastro/compiler/internal/parser.go:3008 +0x3
github.com/withastro/compiler/internal.ParseWithOptions({0x7b9c8, 0x1434260}, {0x14b9e20, 0x1, 0x1})
        github.com/withastro/compiler/internal/parser.go:3072 +0x13
main.main.Transform.func1.1.1()
        ./astro-wasm.go:332 +0x4
created by main.main.Transform.func1.1 in goroutine 6
        ./astro-wasm.go:323 +0x7
exit code: 2
24:09:23 [ERROR] [UnknownCompilerError] Cannot read properties of undefined (reading 'exports')
  Hint:
    This is almost always a problem with the Astro compiler, not your code. Please open an issue at https://astro.build/issues/compiler.
  Error reference:
    https://docs.astro.build/en/reference/errors/unknown-compiler-error/
  Stack trace:
    at syscall/js.valueNew (file:///home/lilith/work/imazen-web/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js:1:4526)
    at wasm://wasm/0138ceae:wasm-function[1567]:0x168b12
    at wasm://wasm/0138ceae:wasm-function[1543]:0x164c04
    at wasm://wasm/0138ceae:wasm-function[1169]:0xfab0e
    [...] See full stack trace in the browser, or rerun with --verbose.`

Link to Minimal Reproducible Example

mailto:[email protected]

@github-actions github-actions bot added the needs triage Issue needs to be triaged label Aug 5, 2024
@lilith lilith changed the title 🐛 BUG: 🐛 BUG: panic: html: bad parser state: originalIM was set twice [recovered] panic: interface conversion: string is not error: missing method Error Aug 5, 2024
@lilith
Copy link
Author

lilith commented Aug 5, 2024

Just forgot the first '---' at the top of the .astro file. Had me panicked for a second

@jasikpark
Copy link
Contributor

Maybe there should be a better error here?

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

2 participants