Skip to content

astro-compress is incompatible with Astro v6 due to bundled astro@5.x dependency #583

Description

@Th3S4mur41

astro-compress@2.3.9 bundles astro@5.16.8 as a direct dependency, which pulls
@astrojs/internal-helpers@0.7.5 to the top level.
When used alongside astro@6.x, this causes a build failure because Astro v6 requires
@astrojs/internal-helpers@0.8.0, which introduced the collapseDuplicateLeadingSlashes
export that is missing in 0.7.5.

Error

15:53:26 [build] Rearranging server assets...
The requested module '@astrojs/internal-helpers/path' does not provide an export named 'collapseDuplicateLeadingSlashes'
  Location:
    /home/runner/work/***/node_modules/astro/dist/core/build/default-prerenderer.js:17:30
  Stack trace:
    at #asyncInstantiate (node:internal/modules/esm/module_job:319:21)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:661:26)
    at async generatePages (file:///home/runner/work/***node_modules/astro/dist/core/build/generate.js:60:3)
    at async Object.buildApp (file:///home/runner/work/***/node_modules/astro/node_modules/vite/dist/node/chunks/config.js:33894:5)
    at async viteBuild (file:///home/runner/work/th3s4mur41.me/th3s4mur41.me/node_modules/astro/dist/core/build/static-build.js:70:3)

Workaround

Override @astrojs/internal-helpers version

{
  ...
  "overrides": {
    "@astrojs/internal-helpers": "0.8.0"
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions