Skip to content

πŸ› BUG:Β #1092

@Coding4Hours

Description

@Coding4Hours

What version of @astrojs/compiler are you using?

latest

What package manager are you using?

bun

What operating system are you using?

arch linux

Describe the Bug

❯ bun run build
$ astro build --experimental-static-build
14:26:42 [vite] Re-optimizing dependencies because vite config has changed
14:26:42 [content] Syncing content
14:26:42 [content] Synced content
14:26:42 [types] Generated 96ms
14:26:42 [build] output: "static"
14:26:42 [build] mode: "static"
14:26:42 [build] directory: /home/coding4hours/dev/bromine/dist/
14:26:42 [build] Collecting build info...
14:26:42 [build] βœ“ Completed in 153ms.
14:26:42 [build] Building static entrypoints...
panic: html: bad parser state: originalIM was set twice [recovered]
        panic: interface conversion: string is not error: missing method Error

goroutine 20 [running]:
main.main.Transform.func1.1.1.1()
        ./astro-wasm.go:333 +0x5
panic({0x17940, 0x7b400})
        runtime/panic.go:770 +0x1a
github.com/withastro/compiler/internal.(*parser).setOriginalIM(...)
        github.com/withastro/compiler/internal/parser.go:545
github.com/withastro/compiler/internal.inBodyIM(0x1456c60)
        github.com/withastro/compiler/internal/parser.go:1106 +0x3f8
github.com/withastro/compiler/internal.(*parser).parseCurrentToken(0x1456c60)
        github.com/withastro/compiler/internal/parser.go:2982 +0x12
github.com/withastro/compiler/internal.(*parser).parse(0x1456c60)
        github.com/withastro/compiler/internal/parser.go:3009 +0x3
github.com/withastro/compiler/internal.ParseWithOptions({0x7bc48, 0x1434460}, {0x1444e20, 0x1, 0x1})
        github.com/withastro/compiler/internal/parser.go:3073 +0x13
main.main.Transform.func1.1.1()
        ./astro-wasm.go:338 +0x4
created by main.main.Transform.func1.1 in goroutine 6
        ./astro-wasm.go:329 +0x7
exit code: 2
14:26:43 [ERROR] [vite] βœ— Build failed in 1.09s
[UnknownCompilerError] [astro:build] Cannot read properties of undefined (reading 'exports')
file: /home/coding4hours/dev/bromine/src/components/ui/Footer.astro:undefined:undefined
  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/
  Location:
    /home/coding4hours/dev/bromine/src/components/ui/Footer.astro:0:0
  Stack trace:
    at syscall/js.valueNew (file:///home/coding4hours/dev/bromine/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js:1:4526)
    at wasm://wasm/01395692:wasm-function[1567]:0x168afa
    at wasm://wasm/01395692:wasm-function[1543]:0x164bec
    at wasm://wasm/01395692:wasm-function[1169]:0xfaaf6
    at Object.transform (file:///home/coding4hours/dev/bromine/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js:1:6575)
error: script "build" exited with code 1

i have no idea what the problem is so i cant get a minimal reproducible example

Link to Minimal Reproducible Example

https://google.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions