Skip to content

Astro 7 (Rolldown) build fails on unresolved @tiptap/extension-drag-handle collaboration peer deps #1544

@swissky

Description

@swissky

Summary

I tried running EmDash on Astro 7 (beta) on Cloudflare Workers (D1). Good news first: the runtime is fine — once it builds, the worker boots, public pages render, the admin loads, login/session work, all with Smart Placement on. So this isn't a runtime/API-compat report.

The blocker is the build. Astro 7 switches Vite's bundler to Rolldown, which errors hard on unresolved imports where Rollup (Astro 6) silently externalized them. The admin editor pulls in @tiptap/extension-drag-handle, whose peerDependencies for the collaboration feature aren't installed (EmDash doesn't use collaboration), so Rolldown fails the build on them — in a cascade.

Repro

Stack: astro@7.0.0-beta.5, @astrojs/cloudflare@14.0.0-beta.2, @astrojs/react@6.0.0-beta.2, react@19.2.4, EmDash 0.21.0, Cloudflare Workers + D1. (Install needed --legacy-peer-deps for the beta stack, but that's just resolution noise — the peer ranges already allow Astro 7.)

astro build fails, one unresolved import at a time:

[vite]: Rolldown failed to resolve import "@tiptap/extension-collaboration"
        from ".../@tiptap/extension-drag-handle/dist/index.js"
→ then "yjs" from ".../@tiptap/y-tiptap/dist/y-tiptap.js"
→ then "y-protocols/awareness" from ".../@tiptap/y-tiptap/dist/y-tiptap.js"

@tiptap/extension-drag-handle@3.27.0 declares these as peers:

@tiptap/extension-collaboration@3.27.0
@tiptap/extension-node-range@3.27.0
@tiptap/y-tiptap@^3.0.5   (→ yjs, y-protocols)

What makes it build

Installing the whole collaboration chain (even though it's unused) lets Rolldown resolve everything:

npm i @tiptap/extension-collaboration@3.27.0 @tiptap/extension-node-range@3.27.0 \
      @tiptap/y-tiptap yjs y-protocols

After that the build completes (emdash Build complete, Server built), deploys, and runs on Astro 7.

Suggestion

Since the drag-handle peers are an internal EmDash detail (consumers don't know they exist), it'd be nicer if EmDash handled this so people don't hit the cascade on Astro 7 / Rolldown — e.g. declare the collaboration chain as (optional)dependencies, or externalize/stub the unused collaboration import in the Astro integration's Vite config.

Filing now as a heads-up — Astro 7 is still beta, so no rush, but the runtime already works and this is the only thing standing between EmDash and an Astro 7 build. Happy to share full build logs or test a patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions