Skip to content

🐛 BUG: UnknownCompilerError: r.transform is undefined when building Astro project #1086

@Sentiax

Description

@Sentiax

What version of @astrojs/compiler are you using?

2.12.2

What package manager are you using?

bun

What operating system are you using?

Windows

Describe the Bug

Astro throws an UnknownCompilerError with the following stack trace when attempting to build or run the project. This happens consistently and seems to originate from the Astro compiler:

TypeError: undefined is not an object (evaluating 'r.transform')
    at <anonymous> (node_modules\@astrojs\compiler\dist\node\index.js:1:828)
    at new Promise (native)
    at transform (node_modules\@astrojs\compiler\dist\node\index.js:1:810)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

This error appears even when using the latest versions of Astro and compatible Node versions. It happens in a fresh project and appears unrelated to specific user code.

Link to Minimal Reproducible Example

i dont

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