Skip to content

πŸ› BUG: Compiler errorΒ #1074

@lukaso

Description

@lukaso

What version of @astrojs/compiler are you using?

5.7.10

What package manager are you using?

pnpm

What operating system are you using?

Mac

Describe the Bug

When compiling the compiler fails.

[0] panic: html: bad parser state: originalIM was set twice [recovered]
[0]     panic: interface conversion: string is not error: missing method Error
[0] 
[0] goroutine 7 [running]:
[0] main.main.Transform.func1.1.1.1()
[0]     ./astro-wasm.go:333 +0x5
[0] panic({0x17940, 0x7b350})
[0]     runtime/panic.go:770 +0x1a
[0] github.com/withastro/compiler/internal.(*parser).setOriginalIM(...)
[0]     github.com/withastro/compiler/internal/parser.go:545
[0] github.com/withastro/compiler/internal.inBodyIM(0x1456360)
[0]     github.com/withastro/compiler/internal/parser.go:1106 +0x3f8
[0] github.com/withastro/compiler/internal.(*parser).parseCurrentToken(0x1456360)
[0]     github.com/withastro/compiler/internal/parser.go:2982 +0x12
[0] github.com/withastro/compiler/internal.(*parser).parse(0x1456360)
[0]     github.com/withastro/compiler/internal/parser.go:3009 +0x3
[0] github.com/withastro/compiler/internal.ParseWithOptions({0x7bb98, 0x1434100}, {0x1445e20, 0x1, 0x1})
[0]     github.com/withastro/compiler/internal/parser.go:3073 +0x13
[0] main.main.Transform.func1.1.1()
[0]     ./astro-wasm.go:338 +0x4
[0] created by main.main.Transform.func1.1 in goroutine 6
[0]     ./astro-wasm.go:329 +0x7
[0] exit code: 2
[0] 23:49:44 [ERROR] [UnknownCompilerError] Cannot read properties of undefined (reading 'exports')
[0]   Hint:
[0]     This is almost always a problem with the Astro compiler, not your code. Please open an issue at https://astro.build/issues/compiler.
[0]   Error reference:
[0]     https://docs.astro.build/en/reference/errors/unknown-compiler-error/
[0]   Stack trace:
[0]     at /Users/user/projects/football/src/pages/set_teams.astro
[0]     [...] See full stack trace in the browser, or rerun with --verbose.
TypeError: Cannot read properties of undefined (reading 'exports')
    at syscall/js.valueNew (file:///Users/user/projects/football/node_modules/.pnpm/@astrojs+compiler@2.11.0/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js:1:4526)
    at wasm://wasm/01393d72:wasm-function[1568]:0x168dce
    at wasm://wasm/01393d72:wasm-function[1567]:0x168afa
    at wasm://wasm/01393d72:wasm-function[2536]:0x3587cb
    at wasm://wasm/01393d72:wasm-function[1163]:0xfaa2b
    at wasm://wasm/01393d72:wasm-function[1169]:0xfaafa
    at d._resume (file:///Users/user/projects/football/node_modules/.pnpm/@astrojs+compiler@2.11.0/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js:1:6412)
    at Object.transform (file:///Users/user/projects/football/node_modules/.pnpm/@astrojs+compiler@2.11.0/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js:1:6575)
    at file:///Users/user/projects/football/node_modules/.pnpm/@astrojs+compiler@2.11.0/node_modules/@astrojs/compiler/dist/node/index.js:1:830
    at new Promise (<anonymous>)

Link to Minimal Reproducible Example

don't have one

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproIssue needs a reproduction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions